If you’ve followed along with the REAPER File Management tutorials, you’ve already set up a folder for temporary files.

In this tutorial I’ll show the OSX users a way to automatically clean the old temp files.

Using Automator (included with OSX) I’ve set up a simple app to find any file older than 7 days, then move them to the trash. Using CronniX I can schedule the app to run nightly.

  • Open Automator and create a new workflow.
  • In the Library (left side column) find and add the action Find Finder Items
    • Set the Search parameter to your TEMP folder.
    • Add the conditions “Kind | is not | folder”.
  • Drag in the action Filter Finder Items from the library
    • Add the conditions “Date late modified | is not in the last | 7 | days”
  • Add the action Move Finder Items to Trash
  • Test your action with the run button in the top right.
  • Save this workflow as an application to your applications folder.

 

automator_temp_folder_cleanup
Automator script [Click to enlarge]
Now we just need to have the system run this program nightly for us. The instructions below will have the app run every day at 12:03AM.

  • Download and install CronniX if you don’t already have it.
    • CronniX is an interface for the Unix function Cron.
    • This is an old app but it still works great.
    • Apple would prefer we used the Launchd function instead of Cron but that is way more complicated.
    • alternatively you can use an event in iCal to run a script, in turn launching the app. more info here: maclife
  • Open CronniX and create a new task
  • In the simple view tab set the schedule parameters to:
    • Minute = 3
    • Hour = 0
    • Day of month = * (all)
    • Month = * (all)
    • Day of week = * (all)
  • In the command section click browse and navigate to your “clean temp folder” app.
    • check option “prepend “/usr/bin/open”
  • Click apply

cronnix1
Cron job [click to enlarge]
To Windows users, this article explains how to make a .bat file that searches for and deletes files in the specified folder that are older than X days. It then explains how to schedule the task.


Posted

in

by

Tags:

Comments

5 responses to “Automatic temp folder cleanup [OSX version]”

  1. Colin Crane Avatar
    Colin Crane

    I have used Mac for years and did not notice my disk is consuming by the useless files. This article helped me much. I also found another free cleanup app Tweak and Tuneup. Apps works fantastic, it cleaned all the the junk stuff within a minute.

  2. Luke Avatar
    Luke

    Can you update this for 2018? Your automater instructions don’t apply anymore.
    Thanks,
    LG

    1. Admin Avatar
      Admin

      I’m doing the exact same thing still. I’m not on Mojave yet though. What’s different?

Leave a Reply

Your email address will not be published. Required fields are marked *