I would like to rename my photos with a copy number that begins at one and omits the copy number when there are no duplicates. I can successfully introduce a copy number that starts at one with the following command, which I discovered here https://exiftool.org/forum/index.php?topic=4660.0 (https://exiftool.org/forum/index.php?topic=4660.0):
exiftool '-FileName<datetimeoriginal' -d "%Y-%m-%d %H.%M.%S%%-.2nc.%%le" FILE
I know that exiftool omits copy numbers when beginning at zero, which I found here http://www.exiftool.org/exiftool_pod.html (http://www.exiftool.org/exiftool_pod.html) under copy number. Is it possible to omit the copy number when beginning with one?
Thanks for the help,
Steve Miller
Hi Steve,
I'm not clear exactly what you want. Is it like this?:
XXX.jpg
XXX-02.jpg
XXX-03.jpg
?
If so, just drop the "." to give %%-2nc
- Phil
I want the files to look like this:
aaa.jpg
bbb.jpg
ccc.jpg
ddd-01.jpg
ddd-02.jpg
ddd-03.jpg
eee.jpg
My file naming convention is "YYYY-MM-DD HH.MM.SS", and I want to use the copy number when there are date/time collisions.
- Steve
Hi Steve,
Ah. Bummer. Not possible. Unfortunately, ExifTool can not look into the future to see if there will be more files named "ddd.jpg", so it has no way to tell if the "-01" should be added when it names this file. (ExifTool does things in a single pass for efficiency.)
- Phil