-r scanning says "file not found" for a particular file (command line works well

Started by dbareis, January 14, 2021, 12:35:09 AM

Previous topic - Next topic

dbareis

This command normally works well, but is failing now, I suspect it would be something about the filename and not it's contents, let me know if you need the file:
exiftool.exe -config exiftool.cfg -overwrite_original -preserve -progress  "-DateTimeOriginal<FileCreateDate" -if "(not $datetimeoriginal)" -r -ext JPG "s:/"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: File not found - s:/2021-01-14 (scanned at 13 Berrima St, Lily)/[Circa 1975] B,L2R, Kid=Sonya Polzin, Marjorie Enid (Marge) Mollenhagen (born Buxton), Eva Anna Bertha Buxton (born Herrenberg), BR=baby Leslie + mother Barbara Polzin - Scanned at Lily's, Berrima St, Maroochydore on 14 JAN 2021 - 487.jpg
   16 directories scanned
  507 files failed condition
    0 image files read
    1 files could not be read


This is on 64 bit Microsoft Windows [Version 10.0.19042.746] and ExifTool version 12.12

dbareis

It may be a file length issue as I'm having similar problems with other commands now, this can be fixed (depending on which Windows api's you use) by prefixing filenames with "\\?\" as the following example shows dor a Windows 10 command line:

S:\> dir "S:\2021-01-14 (scanned at 13 Berrima St, Lily)\[Circa 1975] B,L2R, Kid=Sonya Polzin, Marjorie Enid (Marge) Mollenhagen (born Buxton), Eva Anna Bertha Buxton (born Herrenberg), BR=baby Leslie + mother Barbara Polzin - Scanned at Lily's, Berrima St, Maroochydore on 14 JAN 2021 - 487.jpg"
Volume in drive S is DATA DRIVE.DB$
Volume Serial Number is EE20-9543

Directory of S:\2021-01-14 (scanned at 13 Berrima St, Lily)

File Not Found

S:\> dir "\\?\S:\2021-01-14 (scanned at 13 Berrima St, Lily)\[Circa 1975] B,L2R, Kid=Sonya Polzin, Marjorie Enid (Marge) Mollenhagen (born Buxton), Eva Anna Bertha Buxton (born Herrenberg), BR=baby Leslie + mother Barbara Polzin - Scanned at Lily's, Berrima St, Maroochydore on 14 JAN 2021 - 487.jpg"
Volume in drive \\?\S: is DATA DRIVE.DB$
Volume Serial Number is EE20-9543

Directory of \\?\S:\2021-01-14 (scanned at 13 Berrima St, Lily)

14/01/2021  03:13 PM           339,643 [Circa 1975] B,L2R, Kid=Sonya Polzin, Marjorie Enid (Marge) Mollenhagen (born Buxton), Eva Anna Bertha Buxton (born Herrenberg), BR=baby Leslie + mother Barbara Polzin - Scanned at Lily's, Berrima St, Maroochydore on 14 JAN 2021 - 487.jpg
               1 File(s)        339,643 bytes
               0 Dir(s)  922,269,483,008 bytes free


I tried adding it to the command line but that fails:
exiftool.exe ...  "\\?\S:\2021-01-14 (scanned at 13 Berrima St, Lily)\*.jpg"
Wildcards don't work in the directory specification
No matching files

Phil Harvey

What does "\\?" mean at the start of the directory?  Unfortunately the Windows shells do not automatically glob filenames like other OS's so ExifTool must expand wildcards itself, and I don't know how to handle a "?" in a directory name.

- 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 ($).


Phil Harvey

...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 ($).

dbareis

Yes, hopefully it can or at least use it when you are reading/writing individual files.