ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: jcothron on December 07, 2011, 08:07:32 AM

Title: file renaming using custom exif information
Post by: jcothron on December 07, 2011, 08:07:32 AM
Hi,

I am trying to work out re-naming files using custom exif fields (xmp actually).  Exiftool sees the information as I've shown below, but it will not rename the file due to the errors you see below.  I've shown two examples of code I've tried without success.  I'm sure it is something I'm doing but I don't know what :) It seems I'm getting a problem a little different from the cannot parse makernotes issue, it is saying it can't recognize them.   Help? 

CODE:

echo file: %1
exiftool -rollID %1
exiftool -m "-filname<rollId-c.%%e" %1
pause

RESULT:

C:\Users\John Cothron\Desktop>echo file: "C:\Users\John Cothron\Desktop\Highest-
1.tif"
file: "C:\Users\John Cothron\Desktop\Highest-1.tif"

C:\Users\John Cothron\Desktop>exiftool -rollID "C:\Users\John Cothron\Desktop\Hi
ghest-1.tif"
Roll Id                         : testbatch

C:\Users\John Cothron\Desktop>exiftool -m "-filname<rollId-c.%e" "C:\Users\John
Cothron\Desktop\Highest-1.tif"
Warning: Error rebuilding maker notes (may be corrupt) - C:/Users/John Cothron/D
esktop/Highest-1.tif
Warning: No writable tags set from C:/Users/John Cothron/Desktop/Highest-1.tif
    0 image files updated
    1 image files unchanged

C:\Users\John Cothron\Desktop>pause
Press any key to continue . . .

CODE:

echo file: %1
exiftool -rollID %1
exiftool "-filename<rollId-c.%%e" %1
pause

RESULTS:


C:\Users\John Cothron\Desktop>echo file: "C:\Users\John Cothron\Desktop\Highest-
1.tif"
file: "C:\Users\John Cothron\Desktop\Highest-1.tif"

C:\Users\John Cothron\Desktop>exiftool -rollID "C:\Users\John Cothron\Desktop\Hi
ghest-1.tif"
Roll Id                         : testbatch

C:\Users\John Cothron\Desktop>exiftool "-filename<rollId-c.%e" "C:\Users\John Co
thron\Desktop\Highest-1.tif"
Warning: [minor] Unrecognized MakerNotes - C:/Users/John Cothron/Desktop/Highest
-1.tif
Warning: No writable tags set from C:/Users/John Cothron/Desktop/Highest-1.tif
    0 image files updated
    1 image files unchanged

C:\Users\John Cothron\Desktop>pause
Press any key to continue . . .

Thank you,

John
Title: Re: file renaming using custom exif information
Post by: jcothron on December 07, 2011, 08:25:27 AM
CODE:

echo file: %1
exiftool -rollID %1
exiftool "-filename<${rollId}%%-c.%%e" %1
pause

I think I just answered my own question.  We will see how it goes from here.   It is amazing to me how you can look for the answer forever, then once you decide to ask the question it pops in front of you :)
Title: Re: file renaming using custom exif information
Post by: Phil Harvey on December 07, 2011, 08:58:46 AM
Excellent.  You figured it out.

- Phil