Renaming files by removing numbers at the beginning

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

Moderator: Mr_Noodle

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!
ag6393
 
Posts: 1
Joined: Wed Dec 02, 2020 10:12 am

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.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support