ExifTool Forum

ExifTool => Newbies => Topic started by: ricklevy21 on November 14, 2017, 03:14:35 PM

Title: Rename Image File with non-date tag and add a copy number
Post by: ricklevy21 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
Title: Re: Rename Image File with non-date tag and add a copy number
Post by: StarGeek 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
Title: Re: Rename Image File with non-date tag and add a copy number
Post by: ricklevy21 on November 14, 2017, 05:44:59 PM
Thank you, this worked perfectly!