in reply to deleting windows subdirectories
The print is there for testing purposes. To make it work, you'll just need to uncomment the unlink.use strict; use File::Find; my $workspace = "c:/foo/bar"; find \&delFiles, $workspace; sub delFiles { if(-f) { # unlink $File::Find::name or die "Unable to delete file: $!"; print "$File::Find::name"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re:x2 deleting windows subdirectories
by grinder (Bishop) on Jun 04, 2002 at 18:12 UTC | |
by Steve_p (Priest) on Jun 04, 2002 at 20:34 UTC |