From: "David Samuelsson (PAC)" <[EMAIL PROTECTED]>

> Yes, this is what i found out aswell. So how do i go around this
> problem? should i try using another tactic? 
> 
> The script deletes all files first , that alters the -M on the
> directory, which means  i have to delete the directoy first? but i
> cant do that if there is files in it, unless i am using rmtree from
> File::Basename i think it was, and i really want to be sure that the
> files i delete and the directories i delete are all over $age old.
> 
> Any way to get around this problem? someone must have done this
> before, searching a directoy recursivly and deleting files and
> directorys X days old. 

You could add to your finddepth() call also a "preprocess" callback 
that would get and store the age of the directory before you start 
processing the files in it.

> Is there a way of checking if the directory is empty aswell? would it
> be this?

I don't know if there is an easy way for this. At worst you'll have 
to opendir() it and see if there's anything more than . and ..

Jenda
=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
                                        --- me


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

Reply via email to