I want to set up a script which I can run at about 4PM every day on a cron, to delete folders.
I have a script which puts files into a folder according to date.
For example:
The date is 4th May, the folder name 04_05
The date is 5th May, the folder name 05_05
So on and so forth.
On the 5th May, I want a cron to run to delete the folder 04_05 and all files under it (as the folder the day before is no use now as todays folder has been created and everything runs through this.)
Basically, I just want a script which will run on day 2, and delete the day 1 folder.
Any help is very much appreciated.







Bookmarks