Page 1 of 1

Batch Rename: Numbering reset at 000 for each directory

Posted: 28 Apr 2021 16:17
by TexasDave
I am loving the tool....I have a quick question. I have a typical layout for my photos...

Code: Select all

Photos Folder
   Directory A
      Photo 1
      Photo 2
      ...
      Photo N
   Directory B
      Photo 1
      Photo 2
      ...
      Photo N
   Directory C
      Photo 1
      Photo 2
      ...
      Photo N
I am using the following batch rename: <folder>_<#000>

Right now, the number continues into the next folder. So if there is 10 files in Directory A the numbering starts at 11 for Folder B.

If I do each folder one at a time, all is well. But I want to highlight multiple folders and have the numbering reset for each folder.

How would I do this? Thanks!

Re: Batch Rename: Numbering reset at 000 for each directory

Posted: 30 Apr 2021 11:45
by TexasDave
Still hoping to get an idea on how to reset my photo numbering to start from zero for each folder.

I can do one folder at time with the tool but not keen to do that for 500+ folders.

Or I can also write a linux script (they are on a Linux box) but am very rusty. :-)

Re: Batch Rename: Numbering reset at 000 for each directory

Posted: 30 Apr 2021 11:47
by highend
Write a script for XY instead, like:

Code: Select all

    foreach($folder, <get SelectedItemsPathNames |>, , "e") {
        rename "b", gpc($folder, "file") . "_<#000>", , listfolder($folder, , 1);
    }

Re: Batch Rename: Numbering reset at 000 for each directory

Posted: 30 Apr 2021 12:47
by TexasDave
Thanks for that - I will explore and give it a go!