Running renamer more than once in single folder

Started by Stefanjan, December 04, 2021, 05:04:45 PM

Previous topic - Next topic

Stefanjan

I would like to have files names in a folder with sequential file names in format yyyy-mm-dd-0001

So I run the attached renamer against all the files in a folder. This is fine the first time I run it.

But if I cull a few files during and run it again against all the files I will of course get errors because imatch tries to duplicate some of the file names.

Is the only solution to rename to a dummy name and then run renamer again with the correct sequence? Or is there a clever way to do this in imatch with only renamer run after culling to fill in the gaps in sequence?

Mario

#1
Since you rename the files always as Date-1, Date-2, ... Date-n, each run of the Renamer will inevitably produce the same file names.
Typically you would add the "Unique Number (to prevent...)" step or maybe a global sequence number.

If you rename files before culling (not really recommended) you will end up with "holes" in your numbering schema afterwards.
Which you ten try to close by running the Renamer again, with the same steps. Won't work.

Rename after culling.
Or, setup a "Reset" Renamer preset which renames files using the "Unique Number..." step. This gives all files a unique name.
And then run your original preset again to produce the closed number sequence you want.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

Quote....only solution to rename to a dummy name and then run renamer again w....

That is what I do.

But there is another way!
Imatch will save the original file name.( If you have not disabled the option: Metadata 2 - settings.)

You can then use a metadata template to restore the original file name.
This were especially helpful if your renaming would copy a part of the original file name.

Mario

Quote from: ubacher on December 04, 2021, 05:33:23 PM
You can then use a metadata template to restore the original file name.
You can use the original file name tag in a variable to restore the original file name.
Note that this tag is only set on the first rename op.

Since the OP uses a YYYY.MM-DD-<File Number> preset, the original name is irrelevant for this case.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook