Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: delete old files (windoze)

by xorl (Deacon)
on Oct 15, 2004 at 13:55 UTC ( #399504=note: print w/ replies, xml ) Need Help??


in reply to delete old files (windoze)

This is how I do it.

use File::Find; find(\&wanted, $dir); sub wanted { unlink $_ if -M $_ > $days; }
$dir is the directory you want to delete files from
$days is how old the files are. i.e. if you wanted to delete all files older than two weeks set days to 14.


Comment on Re: delete old files (windoze)
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://399504]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2014-08-01 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (257 votes), past polls