The Downloads folder on your Mac quickly turns into a maze of lost and forgotten files. It needs cleaning and organization to keep it managed.
The good news is that you don’t have to deal with these tedious routine tasks alone. Let your computer take over for you. You can make your Mac clean up your Downloads folder (or any other folder) automatically with the following method.
Organizing Smart Folders
The Smart Folder isn’t a folder at all it’s a saved search, to be exact – but you can use it. With this feature, instead of going through files in the Downloads folder, you can filter them to see a specific subset that interests you.
Using Smart folders in this way has both advantages and disadvantages. The folders are easy to organize, and depending on your rules, allow for some overlap between their contents.
On the downside, you’re not actually deleting files or restructuring the Downloads folder. It just looks like you, meaning the folders stay messy under the hood. To be clear, creating a Smart folder doesn’t change its original content.
How to Create a Folder Smart
To get started, open the Finder folder where the file you downloaded is located. (This will be the Downloads folder if you don’t mess with the system defaults.)
Next, click File > New Smart Folder. You’ll then see the familiar Finder search window. At the bottom of the toolbar, confirm that the search folder is set to Downloads and not This Mac. (Finder tends to go back to searching your entire computer, which is not what you want here.)
Use the available search filters to narrow down the type of downloaded file you are looking for. You can search for keywords using the search box in the toolbar, or add more specific rules by clicking the little plus icon on the far right.
Feel free to combine several file attributes such as Type, Date created, Name, and Content to get more specific with your search.
By default, Finder items must meet all of the listed rules to pass the filter. If you want to be more creative with rule combinations, hold down the Option key while adding a new rule. The Finder then lets you determine whether any, all, or none of the parts of the rule must be met.
Hit the Save button at the top right under the toolbar once you have set up the filter to your satisfaction. You can save the smart folder to the default location (~/Library/Saved Searches) and choose whether you want to add a shortcut to your sidebar.
To group all your smart folders into one, it’s best to use their aliases instead of the original folders. Aliases are shortcuts that help reduce Finder clutter. You can create one for a smart folder using the Make Alias option in its context menu or right-click menu.
It’s up to you whether you want to save the smart folder alias to a custom folder, the Downloads folder itself, or add a sidebar shortcut to it.
Create Folder Actions With Automator
If you’re looking for a solution with a little more muscle, Automator can help. This is a drag-and-drop GUI tool that ships with macOS and lets you create macros and applications.
Unlike Smart Folders, Automator doesn’t just bring you a cleaner look of the Downloads folder. It also helps you automatically delete files that meet certain criteria, or even rename/move them.
Let’s use Automator to automatically delete files added to your Downloads folder. We’ll be using file type as our filter, but the same process applies to sorting your files by other criteria.
First, run Automator, click on New Document, and select Folder Action as your document type. This type of macro works with a single folder and is triggered whenever a new item appears in the folder.
The folder in question here is Downloads. Select it from the drop-down menu in the right-hand pane in Automator’s three-sided view.
Then, drag the Set Variable Value action from the middle pane to the blank workflow section below the dropdown menu. From the Variables list under this section, rename the variable to, say, a new file, for convenience.
Advanced Workflow Actions
Now it’s time to add a second action to the workflow. Drag the Item Finder Filter from the middle pane into the space below the first action. Here, you can specify the file type you are interested in and change the filter accordingly.
Let’s open a document that is a text file or PDF. Our filter should look like in the screenshot below. You can add another filter using one of the + buttons available in the action.
Now, all that’s left to do is send the filtered downloads to the trash. To do this, drag the Move Items to Trash action to the workflow section. This action does not accept any custom parameters. You can go ahead and click File > Save to save the folder action and have it run automatically whenever a new file appears in the Downloads folder.
If you don’t want a superficial cleaning solution like smart folders and you’d rather not fiddle with Automator, give Hazel a try. This is an automation app for macOS and can give you the same results as the two methods above, while being much more user-friendly.
Hazel even has a sample rule for cleaning the Downloads folder. All you have to do is select the checkbox that corresponds to the rule you want to enable. For example, you can select the Movies checkbox to automatically send video files to the Movies folder.
You can edit existing rules and add more of your own. To show you how it’s done, let’s say you want to edit the Movie rule above to upload a movie file to the server and then delete it from Downloads instead of moving it to the default folder. You must first click on the pencil icon below the list of rules to reveal the original rules.
In the popup that appears, leave the trigger action untouched, but adjust the follow-up action:
- Select the Upload option from the dropdown menu and then add the required server details to go with it.
- Add a second action using the + button available next to the first. For this action, select Move from the first dropdown menu and Trash from the second.
Click the OK button to seal your selection.
(Download Automation also lets you get rid of duplicate files and incomplete downloads automatically.)
Creating new rules for other folders is also easy. Start by adding the folder in question to the left pane and you can then add, delete, and edit rules for this folder from the right pane.
Download: Hazel ($32, trial version available)
Thanks For Visit