Command line rename runs directly, but fails when it is in a bat file

Started by ExifRookie, February 03, 2023, 09:57:14 PM

Previous topic - Next topic

ExifRookie

Hello, 

This is probably something simple I am missing, but I am at a loss currently. 

I have a command that works when run from the command line directly -
"C:\Program Files\Hugin\bin\exiftool" "-filename<CreateDate" -d %Y%m%d_%H%M%S%%-c.pano.%%le DJI_0025.JPG -a
But when placed in this bat file, it fails -
REM Rename the output to the date it was captured to help clarify the filename.
"C:\Program Files\Hugin\bin\exiftool" "-filename<CreateDate" -d %Y%m%d_%H%M%S%%-c.pano.%%le DJI_0025.JPG -a
REM This does not work for some reason?
Pause

Here is what happens on the command line -
D:\Photo Location Testing\Rename Test>renameTest2.bat

D:\Photo Location Testing\Rename Test>REM Rename the output to the date it was captured to help clarify the filename.

D:\Photo Location Testing\Rename Test>"C:\Program Files\Hugin\bin\exiftool" "-filename<CreateDate" -d mHS%-c.pano.%le DJI_0025.JPG -a -m
Warning: New file name is empty - DJI_0025.JPG
    0 image files updated
    1 image files unchanged

D:\Photo Location Testing\Rename Test>REM This does not work for some reason?

D:\Photo Location Testing\Rename Test>Pause
Press any key to continue . . .

D:\Photo Location Testing\Rename Test>"C:\Program Files\Hugin\bin\exiftool" "-filename<CreateDate" -d %Y%m%d_%H%M%S%%-c.pano.%%le DJI_0025.JPG -a
Warning: [minor] Possibly incorrect maker notes offsets (fix by 1783?) - DJI_0025.JPG
Warning: [minor] Suspicious MakerNotes offset for tag 0x0025 - DJI_0025.JPG
    1 image files updated

The bat file also fails when run as admin.

I found an old post related to a similar error where Maker Notes Errors were mentioned, but this does not seem to apply to my case. 

Any pointers for me to look into?

Thank you!


StarGeek

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).