in reply to delete folder and its content with plain perl
invalid switch - "log_script" anyone have idea?my $DIR = "D:/log_script/Archive"; my @files = glob("$DIR/*.zip"); for my $file (@files) { next unless -f $file; my $age = -M $file; if ($age > 1 ) { print "$file \n"; system ( 'rmdir', '/S', '/Q', "$file"); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: delete folder and its content with plain perl
by haukex (Archbishop) on Nov 09, 2017 at 17:03 UTC |