I use
exiftool '-filename<${subsecdatetimeoriginal;DateFmt("%Y-%m-%d_%H-%M-%S_%f")}_${make#;s/\s/-/}_${model#;s/\s/-/}_%-.2c.%e' *.jpg
to achieve this
2019-07-25_12-00-01_.60_NIKON-CORPORATION_NIKON-D5300.jpg
2019-07-25_12-00-01_.60_NIKON-CORPORATION_NIKON-D5300_-00.jpg
2019-07-25_12-00-01_.60_NIKON-CORPORATION_NIKON-D5300_-01.jpg
but would like to get
2019-07-25_12-00-01_.60_NIKON-CORPORATION_NIKON-D5300.jpg
2019-07-25_12-00-01_.60_NIKON-CORPORATION_NIKON-D5300(00).jpg
2019-07-25_12-00-01_.60_NIKON-CORPORATION_NIKON-D5300(01).jpg
Is this possible and if 'yes' how?
This may be done with a second command after setting them to -00.jpg etc:
exiftool "-filename<${filename;s/-(\d{2})\./($1)/ or $_=undef}" DIR
But try this out first on some test files to be sure it does what you want.
You will get warnings for files that aren't renamed.
- Phil
Thanks for the answer. But it is not the solution I was looking for.
I'm afraid that once again I'm trying something impossible.
It wouldn't be the first time ::)
The alternative is to always add a copy number, then there isn't the problem because the brackets are always written. Then afterwards you could remove the "(00)" if you wanted. But of course the numbers would start with "(01)" then.
- Phil