Page 1 of 1

Does Hazel parse custom tokens in sort into subfolder?

PostPosted: Wed Nov 04, 2026 10:24 am
by nlippman
What I am trying to do is to name a file with a prefix that can control sorting into a subfolder, in this fashion:

[sortpath] filename.ext

The rule will match using a custom token matching [sortpath] [filename]. The actions on the rule are to a) sort the file into subfolder "sortpath" and rename the file to "filename".

I would like the sortpath to be able to include subfolders, using the "â–¸" token that Hazel uses to separate folders in the sort into subfolder action. Therefore, if "sortpath" read as "subfolderâ–¸subsubfolder" the file would wind up in the subsubfolder folder in the subfolder folder (ok, that's awkwardly written), but what actually happens is that Hazel creates a subfolder called "subfolderâ–¸subsubfolder" and puts there file there.

Is there a way to have Hazel actually parse the content of the matched custom token? (If not, I can just use a custom script to move the file, but having Hazel handle it with builtin actions is always my preferred approach.)

Thanks.

Re: Does Hazel parse custom tokens in sort into subfolder?

PostPosted: Wed Nov 04, 2026 11:48 am
by nlippman
Update: Hazel does have this builtin already. I found the way to edit the pattern to define a folder path delimiter. I had some trouble getting it to work, but finally just recreated the rule and now it is working as needed.

Awesome!