Jump to content

wish to delete all files with file names less than todays date - one hour


jasonc

Recommended Posts

i have temp files created and wish to only delete files that were created an hour ago and all previous.

 

i am using the glob function to delete all files created in the last day, but just realised that if no one visits say for a day or so then some files are left from the previous visit and if many days are like this then there will be many files left.

 

so looking to delete all files with file names with the value of say...

 

2009-08-01_16_59_49.png  and all that are less in value to this.

 

can this be done?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.