Automator Delete Files

Discussion in 'Mac Programming' started by mattjackson, Apr 14, 2017.

  1. mattjackson macrumors member

    Joined:
    Mar 11, 2014
    #1
    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!
     
  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    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
     
  3. mattjackson thread starter macrumors member

    Joined:
    Mar 11, 2014
    #3
    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?
     
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    Yes that's correct.

    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
     

Share This Page