Advanced Mac users can use AppleScripts to get a lot of things done. These simple scripts can be written to execute actions on files; files and apps can be opened or closed in response to another action, and processes can be started or ended. Not everyone can be good at writing scripts however and for the not-so advanced users, there are apps that help you automate functions like this. Sorter is a free app available in the Mac App Store that allows you to monitor folders for files and enter rules for executing actions like deleting or moving them, redirecting them to an Automator workflow, or running a script on them automatically. The app is useful for ordinary as well as power users. The rules you create with Sorter are executed manually or based on certain triggers, and there isn’t any way to set the app to run them periodically, which might make it less useful for power users. However, this doesn’t diminish its usability for the rest of us.
Setting a rule in Sorter is simple and when you first launch it, help bubbles appear to show you how to get started. Sorter will monitor folders for changes in files. The first step is to enter a name for the rule, making sure it is a name appropriate for the rule for your own convenience. Next, select which folder you want to apply the rule to and then start setting the conditions. The rule can be executed if any or all the conditions you’ve set are true. There are four parameters that can define a condition: Contents, Filename, Created, and File Size. Each parameter is given a value that you can set based on the parameter type. For instance if you select ‘Contents’, you can enter a word or phrase in the value field while if you choose ‘Created’ you have to specify a date. The parameter may be subject to containing the value you’ve set, to begin or end with it, to match it exactly or to exclude it.
There are also a few advanced options available for monitoring files. Click ‘Advanced’ and you will see options to include folders and symbolic links in the rule as well. You can also set a few triggers for when the app will execute the rule automatically.
Once you’ve set the rules, define the action(s) that should be executed when the rules are triggered. You can set no action to be performed, to run a shell script, to move the file, or to perform an Auotmator workflow. Sorter’s preferences allow you to set the logging and notifications frequency, as well as the FSEvents latency.
Rules that you add are all associated with a folder so when you add a rule, the folder appears in Sorter’s sidebar and expanding the folder in the sidebar reveals the rules set for it by name. This is why it is important to make sure the rules are named appropriately. Also, make sure you check the ‘rule is active’ option to activate it and click the cog wheel button on the top right to run it. If you aren’t sure where you could possibly use an app like Sorter, check out our post on how to selectivelydisable and delete Messages history, and make the process easier by filtering it via Sorter.