Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

Mac Automator Delete Files

Matt__James

macrumors regular
Original poster
Mar 11, 2014
230
59
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
31,126
10,864
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
 
Comment

Matt__James

macrumors regular
Original poster
Mar 11, 2014
230
59
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?
 
Comment

Weaselboy

Moderator
Staff member
Jan 23, 2005
31,126
10,864
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
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.