Author Topic: %f problems in Windows 10  (Read 1056 times)

Sheridan

  • Newbie
  • *
  • Posts: 8
%f problems in Windows 10
« on: April 11, 2018, 07:28:46 PM »
Hello;

Well I've got your tool working fine in single file mode (and again many thanks) but am now trying to do batch processing and having a problem. The command I'm using is:

exiftool "-JpgFromRaw<=%%dJ4R_Rep_%%f.jpg" -ext NEF -r (i've tried single and double %s)

I am in the correct directory when issuing it. There are files named J4R_Rep__DSC0402.jpg for example and it's corresponding _DSC0402.NEF exits also in the same directory in fact.

I get "No file specified" as the return response. I've also tried having the J4R...at the end of the file names but same result.

So...It has to be something silly I'm missing, but missing it I am.

Thanks for your time.
Sher

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3785
Re: %f problems in Windows 10
« Reply #1 on: April 12, 2018, 12:10:41 AM »
(i've tried single and double %s)
 

You'll only need double percent signs when you use %d/%f/%e/%c in a date format string (-d option) or if you're using a Windows batch file.

Quote
I get "No file specified" as the return response.

You get this response because you didn't enter a file or directory for exiftool to process.  Since you say you're in the correct directory, you can use a single dot . to represent the current directory and exiftool will, in this case because of the -ext option, process all NEF files in the current directory.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Sheridan

  • Newbie
  • *
  • Posts: 8
Re: %f problems in Windows 10
« Reply #2 on: April 12, 2018, 07:04:25 PM »
Sigh. Still not working. I'm working from the command line trying to write all the existing jpg files to Thier nef files and here's what I get:

CHECKING FILES EXIST

D:\Pictures>dir *_DSC040*.jpg
 
04/11/2018  04:42 PM         5,300,570 J4R_Rep__DSC0402.jpg

D:\Pictures>dir *_DSC040*.nef
 
04/11/2018  05:14 PM        13,911,440 _DSC0400.NEF

CHECK MOST BASIC COMMAND

D:\Pictures>exiftool "-JpgFromRaw<=J4R_Rep__DSC0402.jpg" _DSC0402.NEF
    1 image files updated

CHECK THAT %f WORKS

D:\Pictures>exiftool "-JpgFromRaw<=J4R_Rep_%f.jpg" _DSC0402.NEF
    1 image files updated

NOW TRY TO HAVE COMMAND FIND THE APPROPRIATE . NEF FILE

D:\Pictures>exiftool "-JpgFromRaw<=J4R_Rep_%f.jpg" -ext NEF
No file specified
   
D:\Pictures>exiftool "-JpgFromRaw<=J4R_Rep__DSC0402.jpg" -ext NEF
No file specified
======
The command doesn't seem to understand the -ext NEF part. 
Any ideas what I'm doing wrong?

I did try various other things; a " ." after the NEF caused all nef files to be checked in the directory and have an error (forgotten exact error) associated with them except for a line at the very end saying 1 file updated - which I assume was the file that should be updated.  Perhaps this is what should happen?

Thanks for your help.
Sher

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3785
Re: %f problems in Windows 10
« Reply #3 on: April 12, 2018, 08:03:46 PM »
The command doesn't seem to understand the -ext NEF part. 
Any ideas what I'm doing wrong?

The -ext NEF tells exiftool to only process NEF files.  You still need to give it some files and/or directories to process.  -ext NEF is not the same as *.NEF.

Quote
I did try various other things; a " ." after the NEF caused all nef files to be checked in the directory and have an error (forgotten exact error) associated with them except for a line at the very end saying 1 file updated - which I assume was the file that should be updated.  Perhaps this is what should happen?

Yes.  That told exiftool to process the current directory and it looked at all your NEF files in that directory.  To say more would require the output to be posted.

Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Sheridan

  • Newbie
  • *
  • Posts: 8
Re: %f problems in Windows 10
« Reply #4 on: April 12, 2018, 10:44:03 PM »
Ooo boy do I feel like a dummy. Ok, read your comments and did some more manual reading and I see that I managed to miss the obvious.

So... For the record and anyone else who might miss the obvious...

D:\Pictures>exiftool "-JpgFromRaw<=%dJ4R_Rep_%f.jpg" -ext NEF . -r  {note the "." for directory}
Error opening file ./TestFolder/J4R_Rep__DSC0388aabb.jpg (a "dummy folder to test recursive checks)
Error opening file ./J4R_Rep__DSC0388.jpg
.... lots more files listed
Error opening file ./J4R_Rep__DSC0572.jpg
    2 directories scanned
    1 image files updated
  183 image files unchanged

All looks good, file expected to change not listed as an error, sub directory scanned as well and 1 file updated.

Thanks muchly.
Sher