Automator Delete Files

mattjackson

macrumors regular
Original poster
Mar 11, 2014
179
20
I've been trying to get to grips with Automator, but am struggling.

Is it possible to create something that automatically deletes all files in my Downloads folder at a certain time each day?

My Downloads folder gets so cluttered!
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
29,159
8,818
California
You could make a Automator application like this one, then follow the instructions here to have Calendar run the app once a day whenever you like.

I just tested this and it works.

Screen Shot 2017-04-14 at 9.30.03 AM.png
 

mattjackson

macrumors regular
Original poster
Mar 11, 2014
179
20
If I'm interpreting this right then, it means I'd need a daily event in my calendar to trigger it?

Is there a way to trigger the automator by a new file being created in the downloads folder?

E.g. Every time a new filer is created in the folder, automator runs and deletes all files that are more than 1 day old?
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
29,159
8,818
California
If I'm interpreting this right then, it means I'd need a daily event in my calendar to trigger it?
Yes that's correct.

Is there a way to trigger the automator by a new file being created in the downloads folder?

E.g. Every time a new filer is created in the folder, automator runs and deletes all files that are more than 1 day old?
I have not tested it, but Automator can make a Folder Action like this that I think would do what you want.

Screen Shot 2017-04-15 at 4.05.49 AM.png
 
  • Like
Reactions: superscape