I tried the following command in the Windows command line to rename my pictures according to the date/time at which the photo was taken:
exiftool.exe -fileOrder datetimeoriginal "-FileName<$%16f%+.4nC.%le" -r -P <PATH>
I've got filenames in the format Photography_2018_385.ext, and I want to rename them to Photography_2018_0001.ext, but the actual result is $Photography_2018_0001.ext - almost correct, but not completely.
I don't know exactly if this is a bug or if I'm missing something. This is, of course, not a big deal, but I still want to know how to change this behavior. Simply removing the dollar sign breaks the command and it doesn't work anymore at all (output:
Warning: No writable tags set from <PATH>
Warning: Invalid tag name '%16f%+.4nc.%le' - <PATH>
for all the pictures).
Thanks in advance for your help :)
EDIT: If you have a better solution for this problem, I would be happy as well.
Remove the dollar sign and change the less than sign to an equal sign.
exiftool.exe -fileOrder datetimeoriginal "-FileName=%16f%+.4nC.%le" -r -P <PATH>
Common Mistake #5c (https://exiftool.org/mistakes.html#M5). The less/greater than signs are used to copy tags. The equal sign is used to assign static values which the file name variables (%f, %e, %c, %d) fall under. I'm not sure of the actual interaction here since the dollar sign seems to be forcing a string interpretation of the rest of the command (see common mistake 5b) so it's sorta weird.
Thank you very much :D