in reply to How to get a List of drives on window
Note that Win32API::File has a nice advantage over the other modules previously suggested in that it is part of libwin32 and so comes preinstalled with Win32 binary distributions of Perl.
Since you probably don't want to search the floppy, CD-ROM, unpartitioned, nor network drives. - tye (but my friends call me "Tye")use strict; use Win32API::File qw( getLogicalDrives GetDriveType :DRIVE_ ); for my $root ( getLogicalDrives() ) { my $type= GetDriveType($root); if( DRIVE_FIXED == $type || DRIVE_RAMDISK == $type ) { .... } }
|
|---|