Page 1 of 1

Renaming files by removing numbers at the beginning

PostPosted: Wed Dec 02, 2020 10:19 am
by ag6393
I have a bunch of PDFs that are automatically generated and named in this format: "#### - [client name].pdf"

Where #### represents a ticket number from a ticketing system, and [client name] is one of a dozen or so client names. I want to automatically sort these PDFs into subfolders by client name, and rename them with this format:

"[Client name] - [date modified].pdf"

The only thing I'm stuck on is how to get Hazel to detect the #### portion and remove it from the name, so I'm left with just the client name, which I can use to sort into subfolders, before renaming again with a date stamp appended.

Any ideas on this? Thanks!

Re: Renaming files by removing numbers at the beginning

PostPosted: Wed Dec 02, 2020 10:56 am
by Mr_Noodle
Look up "match patterns" in the manual. You can set up a custom attribute to grab all the text after the number and use that in the Rename pattern.