Restart increment counter on subfolder name change

Advanced Renamer forum
#1 : 06/04-14 14:53
Sailor Guy
Sailor Guy
Posts: 40
I have a method list that renames all files in a subfolder using the subfolder's name and then appends a 3-digit increment number.

Here is the correct result if I only process one subfolder at a time:

DirName1

* Image1.jpg -> DirName1-001.jpg
* Image2.jpg -> Dirname1-002.jpg
* Image3.jpg -> DirName1-003.jpg

DirName2

* Image1.jpg -> DirName2-001.jpg
* Image2.jpg -> Dirname2-002.jpg
* Image3.jpg -> DirName2-003.jpg

This method list works perfectly if I select one subfolder at a time, but if I check the "include subfolders" option to process multiple folders at once, the increment does not reset to "001" when a new subfolder is processed - it continues from the last increment.

Here is the incorrect result (on the DirName2 subfolder) if I process multiple subfolders at once:

DirName1

* Image1.jpg -> DirName1-001.jpg
* Image2.jpg -> Dirname1-002.jpg
* Image3.jpg -> DirName1-003.jpg

DirName2

* Image1.jpg -> DirName2-004.jpg (wrong increment - should be 001)
* Image2.jpg -> Dirname2-005.jpg (wrong increment - should be 002)
* Image3.jpg -> DirName2-006.jpg (wrong increment - should be 003)

Is there an easy way to reset the increment counter back to "001" when the directory name changes or when a new subfolder is processed?

Thank you!


06/04-14 14:53 - edited 06/04-14 14:56
#2 : 06/04-14 15:19
Stefan
Stefan
Posts: 274
Reply to #1:


?

user_guide ?


http://www.advancedrenamer.com/user_guide/tags_ default


<Inc NrDir:X:Y> Acts like <Inc Nr> with the exception that this function counts per folder.





.


06/04-14 15:19
#3 : 06/04-14 16:17
Sailor Guy
Sailor Guy
Posts: 40
Well, that was easy!

Thanks, Stefan!


06/04-14 16:17