Renaming Files

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

Moderator: Mr_Noodle

Renaming Files Wed Jan 30, 2019 4:46 pm • by ShirleyPrints
I don't understand the renaming by pattern feature and I'm hoping someone can help me.

The file names which I need Hazel to rename are formatted by a computer system like this (I hope I got the time abbreviations right but you can see the pattern is "date-time"):

YYYY-MM-DD-HH-MM-SS-JOBNO.ITEMNO-JOBNO-ITEMNO-.pdf

Two example file names:

2019-01-30-14-34-56-10262.18-10262-18-.pdf
2019-01-28-21-42-38-10244.1-10244-1-.pdf

So, I need to keep the date and the job number/item no but remove the time and the repeated job number and that last dash if possible.

I want to end up with these file names:

2019-01-30-10262.18.pdf
2019-01-28-10244.1.pdf

Can that be done? I'm lost. TIA
ShirleyPrints
 
Posts: 1
Joined: Wed Nov 21, 2018 7:36 pm

Re: Renaming Files Thu Jan 31, 2019 11:55 am • by Mr_Noodle
Search the manual for "match patterns". Using those, you can create a pattern to match that, with custom attributes for the parts you want to keep. Then in the Rename pattern, you can include the custom attributes you created earlier for the new name.

If you run into specific problems, post back here with what you have so far.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support