trying to renumber inside the filename

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

Moderator: Mr_Noodle

trying to renumber inside the filename Mon Oct 18, 2021 3:05 pm • by lijou
Hi!

I tried the manual but still don't know how to do this... I'm a beginner and maybe this software is too complex for me?

I have a bunch of music files in a folder that need to be renumbered 'inside' the file name, originally they have this pattern:

THENERVE_NNN_Version-name-etc-1.wav

where NNN is a three digit number that grows incrementally to match the number of files in the folder.

when I have finished making those files, at a later date I need to renumber them from a given offset but keeping the rest of the name intact, so, I am assuming I can choose the folder somehow (don't know how as I'd like to just browse for it in each case) then:

THENERVE_001_Version-name-something1.wav
THENERVE_002_Version-name-something1.wav
THENERVE_003_Version-name-somethingelse-2.wav
etc.

are then offset, for instance to:

THENERVE_092_Version-name-something1.wav
THENERVE_093_Version-name-something1.wav
THENERVE_094_Version-name-somethingelse-2.wav
etc.

I assume I can just select the files manually somehow so then I created a rule that says:

if all of the conditions are met
Name matches abc_123_ab12%? // because after the number there may be any characters in the name

Do the following to the matched file or folder

rename with pattern other...

//and this is where I get stumped as I can't seem to refer to the original pattern and to select just the 3-digit number to increment...

help, please? :)

(also, would be good to know how to just manually browse for a folder whose files I want to renumber and run the rule)
lijou
 
Posts: 2
Joined: Mon Oct 18, 2021 2:38 pm

Re: trying to renumber inside the filename Tue Oct 19, 2021 10:28 am • by Mr_Noodle
Hazel is meant to monitor a folder and process files automatically. It's not meant for triggering at will.

To renumber, you need to set up your pattern with custom attributes to match the parts of the name you want to keep. In your case, you want to have a custom attribute to match the part before the number, and another for the rest of the filename after.

In your Rename pattern, you can then use those custom attributes. For the number part, you can drag in the counter attribute (#). The tricky part is that the counter starts from 1. If you want to set an offset, click on the counter attribute to bring up the menu and select the adjustment option. You can then set an adjustment to increase that number by a fixed amount.
Mr_Noodle
Site Admin
 
Posts: 9781
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: trying to renumber inside the filename Tue Oct 19, 2021 3:13 pm • by lijou
Thanks!
lijou
 
Posts: 2
Joined: Mon Oct 18, 2021 2:38 pm


Return to Support