Renaming downloaded files that contain %20 in the filename (using Hazel)?


I’m uploading pdfs to Notion on a Windows based machine and then downloaing them from Notion to my Mac. The spaces in the filenames are always end up being shown as %20.

I would like to create a Hazel rule that looks for files with %20 in the filename and then renames the %20 with a proper space (essentially getting the filename back to its original state).

My rule is looking in the Download Folder and matching any file with %20 in the filename - easy.

But what next Hazel rule would replace characters in a file name? Can this even be done?

Many thanks for your help.

Managed to sort this myself (see below). I hadn’t realised there was a ‘replace text’ option if you clicked on the ‘name’ element.

1 Like

Don’t feel bad… I used shell scripts to rename files in Hazel for years before I happened to be asking the Hazel developer for help with something else and he said “Why are you doing that instead of just using the built-in rename feature?”

To which I had to answer: “Because I didn’t know it was there.”

(Aside: Hazel could really benefit from a better user community… there’s a forum, but it’s not very active… mostly it’s users asking questions and the developer telling them to check the manual.)

1 Like