ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: MarcelG on January 05, 2022, 01:45:03 AM

Title: DIR not working for .HEIC -files
Post by: MarcelG on January 05, 2022, 01:45:03 AM
I have tried multiple syntax and the same syntax that is working when there are .JPG's in that folder but not working for the .HEIC-files.

version: v12.38 (windows)

The V:\Photoslider\Wijnen\ contains 9x .HEIC-files

Not working (for the .HEIC-files in that directory, the .JPG-files are without any problems):
exiftool "-filemodifydate<${datetimeoriginal;s/  /01/g}" "-filecreatedate<${datetimeoriginal;s/  /01/g}" "V:\Photoslider\Wijnen\"
    1 directories scanned
    0 image files read
exiftool "-filecreatedate<datetimeoriginal" "V:\Photoslider\Wijnen\"
    1 directories scanned
    0 image files read

Working:
exiftool "-filemodifydate<${datetimeoriginal;s/  /01/g}" "-filecreatedate<${datetimeoriginal;s/  /01/g}" "V:\Photoslider\Wijnen\IMG_06362.HEIC"
    1 image files updated


Does anyone else know the answer for this problem ?
Thanks in advance.
Title: Re: DIR not working for .HEIC -files
Post by: StarGeek on January 05, 2022, 02:05:06 AM
Remove either the quotes around the path or remove or double the trailing slash.

The problem is that Windows is reading \" as an escaped double quote, so the path you're passing to exiftool is V:\Photoslider\Wijnen" double quote included

So any of these should work
V:\Photoslider\Wijnen\
"V:\Photoslider\Wijnen"
"V:\Photoslider\Wijnen\\"


edit: Or use forwards slashes instead, as that's how exiftool (acutally Perl I think) treats file paths internally
"V:/Photoslider/Wijnen/"
Title: Re: DIR not working for .HEIC -files
Post by: MarcelG on January 05, 2022, 02:54:38 AM
 :D

Quote from: StarGeek on January 05, 2022, 02:05:06 AM
Remove either the quotes around the path or remove or double the trailing slash.

The problem is that Windows is reading \" as an escaped double quote, so the path you're passing to exiftool is V:\Photoslider\Wijnen" double quote included

So any of these should work
V:\Photoslider\Wijnen\
"V:\Photoslider\Wijnen"
"V:\Photoslider\Wijnen\\"


edit: Or use forwards slashes instead, as that's how exiftool (acutally Perl I think) treats file paths internally
"V:/Photoslider/Wijnen/"

I can confirm, that these are working. Super!
"V:\Photoslider\Wijnen\\"
"V:/Photoslider/Wijnen/"

I am very happy with your swift and correct answer.
Thanks again and have a nice day.