joshboski has asked for the wisdom of the Perl Monks concerning the following question:
then from here I need to search said drive(s) for a specific file and delete that file...Im stuckopen(FSUTIL,"fsutil fsinfo drives | "); while (<FSUTIL>) { $DRIVES=$_; } close(FSUTIL); chop $DRIVES; chop $DRIVES; $DRIVES=~ s/Drives://; #print "DRIVES:[$DRIVES]"; @drive=split(/\\/,$DRIVES); foreach $letter (@drive) { print "Searching drive:$letter\n"; open(FSUTIL,"fsutil fsinfo drivetype $letter|"); while (<FSUTIL>) { $DRIVETYPE= $_; } close(FSUTIL); print "DRIVETYPE:$DRIVETYPE\n"; if ( grep("Fixed Drive",$DRIVETYPE) != "" ) { print "HIT\n"; ("this is just a test to see if it worked) }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: find and delete file in Drive
by grep (Monsignor) on Jul 30, 2008 at 21:03 UTC | |
|
Re: find and delete file in Drive
by betterworld (Curate) on Jul 30, 2008 at 22:24 UTC | |
|
Re: find and delete file in Drive
by poolpi (Hermit) on Jul 31, 2008 at 09:13 UTC |