Automating File Organization with Hazel

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Automating File Organization with Hazel Fri Jan 16, 2026 12:12 am • by andrejames
Hello,
I'd like to save a file to my desktop, and based on the file name, I want Hazel to automatically organize it into a specific folder.

For example, if I save a file named # clientA logo.png, can Hazel rename it to clientA logo.png and then move it to a folder called clientA on my hard drive?

I used a hash symbol at the beginning of the file name to prevent this from happening to all files.

This setup essentially allows me to use a command-line format when saving files, so I can just type the folder name where I want the file to go instead of searching for it manually.
andrejames
 
Posts: 1
Joined: Fri Jan 16, 2026 12:06 am

Re: Automating File Organization with Hazel Fri Jan 16, 2026 9:39 am • by Mr_Noodle
Look up match patterns in the help. You can set up a pattern and use a custom text attribute to match the text after the #. You can then use that in a Sort into subfolder pattern.

For the renaming, you have a couple of approaches.

Since you are using a match pattern, you can also use a custom text attribute to match the remainder of the name after the client. You can then rename using a combination of the client attribute as well as the attribute for the remainder text.

Alternatively, you could rename and use the replace text function to replace the # with nothing. While simpler, it won't work if # appears elsewhere in the name.
Mr_Noodle
Site Admin
 
Posts: 12132
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support