in reply to delete old files (windoze)
This is how I do it.
$days is how old the files are. i.e. if you wanted to delete all files older than two weeks set days to 14.
$dir is the directory you want to delete files fromuse File::Find; find(\&wanted, $dir); sub wanted { unlink $_ if -M $_ > $days; }
$days is how old the files are. i.e. if you wanted to delete all files older than two weeks set days to 14.
|
---|
In Section
Seekers of Perl Wisdom