Author Topic: Rename Image File with non-date tag and add a copy number  (Read 823 times)

ricklevy21

  • Newbie
  • *
  • Posts: 9
Rename Image File with non-date tag and add a copy number
« on: November 14, 2017, 03:14:35 PM »
Through Windows Command Prompt I am trying to rename jpg files using the value in the "artist" tag. However, some of the images have the same author, so I would like to use the %C feature to create copy numbers. I would also like to retain the original file extension.

here is what I am running:

exiftool "-FileName<artist" %%-C.%%e DIRECTORY

but each time, i get an error that the file already exists and only the first file is renamed successfully.

I am able to use the provided dateCreated example that is provided successfully, but as soon as I specify a different tag, it fails.

Any suggestions?

Thanks,

Rick

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3964
Re: Rename Image File with non-date tag and add a copy number
« Reply #1 on: November 14, 2017, 05:08:31 PM »
You're close.  First, you want to include the %-C.%e inside the quotes.  You also don't need to double the percent signs as they're not part of a -d format option, unless this is part of a Windows bat file.  Finally, since this isn't a direct tag to tag copy because you're adding stuff, Artist will need a dollar sign in front of it.

Try
exiftool "-FileName<$Artist%-C.%e" DIRECTORY
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

ricklevy21

  • Newbie
  • *
  • Posts: 9
Re: Rename Image File with non-date tag and add a copy number
« Reply #2 on: November 14, 2017, 05:44:59 PM »
Thank you, this worked perfectly!