Roiy,

I already had something similar. It actually deletes files older than 45
minutes. Just change .03124 to a "3" for 3 days. 

# For each file in the folder..
while(<d:\\temp\\*.*>) {
        # If the file is not a directory, and is older than 45 minutes,
delete it
        if ((!-d $_) && (-M $_ > .03124)) {
                unlink $_;
        }
}


How's that for a beginner? :)

-Bob

-----Original Message-----
From: Zysman, Roiy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 1:19 PM
To: '[EMAIL PROTECTED]'
Subject: a beginners challenge



> Hi All,
> Why not make a little challenge ..
> Lets see who can write the most lean ,mean , elegant , powerful, poetic
> (but most important)  _Shortest_, script that cleans from a directory
> files that are at least 3 days old.
> Good luck all,
> You're welcome to pick who you think is the winner.
> Roiy
> 
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to