Try this:
#!perl.exe -w
use strict;
use Win32API::File qw( :ALL );
my @drives = getLogicalDrives();
my %Types =
0 => 'DRIVE_UNKNOWN',
1 => 'DRIVE_NO_ROOT_DIR',
2 => 'DRIVE_REMOVABLE',
3 => 'DRIVE_FIXED',
4 => 'DRIVE_REMOTE',
5 => 'DRIVE_CDROM',
6 => 'DRIVE_RAMDISK',
);
foreach my $letter ( @drives ) {
my $DriveType = GetDriveType($letter);
print "Drive $letter is $Types{$DriveType}\n";
}
exit;
--
Dave Davisson
[EMAIL PROTECTED]
----- Original Message -----
From: "Asif Kaleem" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 26, 2001 7:37 AM
Subject: How to find a drive exsistence
> Hello Gang:
>
> I am in a process of writing a Perl program that has the following
requirement.
>
> $DumpDevicesDrive = "F";
>
> This variable is read from a configuration file if this variable has a
value we
> proceed on, if this variable is not set then we look for Drive F, if not
found
> look for drive D, if not found look for Drive C.
>
> My Question: Is there a way to find out if the drive exists?
>
> Thanks
> --Asif Kaleem
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> _______________________________________________
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users