Auto deleting files older than 24hours

Discuss RoboTask here
Post Reply
gumby69
Posts: 6
Joined: Fri Dec 11, 2009 8:10 am

Auto deleting files older than 24hours

Post by gumby69 »

I have a temp folder that i wish to keep files that are only 24 hours or less. Anything older i wish to delete. Is there any way of accomplishing this? This folder gets enormous and manually pruning this is a pain. Is there a command line that can be done to solve this? 
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Auto deleting files older than 24hours

Post by Oleg »

See the example named "[DEMO] Clear Temporary Folder" (find it in "Complex" folder)
You can get this task here

Also look at a bit modified task here.

These tasks removes files older than 7 days. I think you are able to modify the task for your purposes.
gumby69
Posts: 6
Joined: Fri Dec 11, 2009 8:10 am

Auto deleting files older than 24hours

Post by gumby69 »

Thanks Oleg for the super quick response man mucho appreciated!
gumby69
Posts: 6
Joined: Fri Dec 11, 2009 8:10 am

Auto deleting files older than 24hours

Post by gumby69 »

Hi Oleg I tried the task you gave me and unfortunately it deleted everything as opposed to just files older than 7 days. What am i doing wrong?
 
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Auto deleting files older than 24hours

Post by Oleg »

You have to change the task a bit.

- Open the task in task editor
- Go to Step 5 (file loop) and open it in editor
- go to "Date filter" tab
- change "Older than 7 days" to "Older than 1 day" or "Older than 24 hours"
- save the step and save the task
gumby69
Posts: 6
Joined: Fri Dec 11, 2009 8:10 am

Auto deleting files older than 24hours

Post by gumby69 »

Hi Oleg i tried this and it deleted all files regardless of date. I am using version 3.2.1 does this make a difference?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Auto deleting files older than 24hours

Post by Oleg »

In your case set the date filter to "Older than 1 day"
Post Reply