Main Menu

Improper EXIF header

Started by rthakor5, May 15, 2023, 05:40:06 PM

Previous topic - Next topic

rthakor5

So I tried testing this command with a bunch of Jpeg extended files which are actually WebP files. Here is the example command:

exiftool -ext jpeg "-fileName<%f.$fileTypeExtension" test.jpeg

which gave me the error:

Warning: [minor] Improper EXIF header - test.jpeg
Warning: No writable tags set from test.jpeg
Warning: Invalid tag name '%f.'. Use '=' not '<' to assign a tag value - test.jpeg

I then re-ran the command with "=" instead of "<":

exiftool -ext jpeg "-fileName=%f.$fileTypeExtension" test.jpeg

which changed the naming from "test.jpeg" to "test." without an extension. Is this expected?

StarGeek

Your command is correct by using <.  It includes a tag to copy FileTypeExtension.

Your command works correctly here.
C:\>exiftool -G1 -a -s -filetype Y:\!temp\aaaa\001.jpeg
[File]          FileType                        : WEBP

C:\>exiftool -ext jpeg "-fileName<%f.$fileTypeExtension" Y:\!temp\aaaa\
    1 directories scanned
    1 image files updated

C:\>exiftool -G1 -a -s -filename Y:\!temp\aaaa
======== Y:/!temp/aaaa/001.webp
[System]        FileName                        : 001.webp
    1 directories scanned
    1 image files read

I suspect you're either using PowerShell instead of CMD or using a .bat file.  If the former, make sure you look at the highlighting.  Make sure it is all the same color in each argument.  Notice how $CreateDate has a different color in this example.

In this case, you would have to swap double/single quotes.

If in a .bat file, then it is FAQ #27.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

rthakor5

Thank you for the response StarGeek! Yes the issue was with the quotes, using single quotes made the command execute properly.