Better output than "1 image file updated"

Started by rubpa, January 14, 2017, 10:22:51 AM

Previous topic - Next topic

rubpa

I rename *.MOV files with the following for loop:

for i in IMG*.MOV
do
        exiftool -d "%Y%m%d(%H%M%S).%%e" "-FileName<CreationDate" $i
done

    1 image files updated
    1 image files updated


I want a better output than the above. I tried adding -p '$FileName updated to $CreationDate' but I get this:

Ignored superfluous tag names or invalid options: -FileName ...
    1 image files updated


How can I improve the output to indicate a little more of what exiftool did exactly?

Phil Harvey

You fell into this trap.  Try this command instead of your script:

exiftool -d "%Y%m%d(%H%M%S).%%e" "-FileName<CreationDate" -v IMG*.MOV

Here I have added the -v option to give you more details about what ExifTool has done.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

rubpa

Great! But using the for loop is so natural (for me ;) ) that I may continue to use it.

So the trick was the -v option which I think I tried before posting. Anyway, tried again and it gives me what I want.

Thanks for the great tool!  :D

Phil Harvey

Quote from: rubpa on January 15, 2017, 10:20:13 AM
Great! But using the for loop is so natural (for me ;) ) that I may continue to use it.

Sure, but just be aware that it will be a LOT slower re-launching ExifTool for each file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).