ExifTool Forum

ExifTool => Newbies => Topic started by: lokatz on April 13, 2020, 05:06:06 PM

Title: Cannot get JpgFrom Raw conversion to run from args file
Post by: lokatz on April 13, 2020, 05:06:06 PM
Definitely a newbie here, so sorry if I am overlooking something I shouldn't.  Spent the better part of the day trying to run Exiftool in the background as a Windows process started from a C# program, which keeps exiting the process unsuccessfully.  Thought I might be able to use an args file as a workaround, but this also does not seem to work.

The weird (to me) thing is that running Exiftool from a Windows shell with this command:

exiftool -b -JpgFromRaw C:\ProgramData\MyImages\Bird.NEF > C:\ProgramData\MyImages\Bird.jpg

works great.  However, packing the same commands (everything from -b, exact copy-and-paste) into exifargs.txt and then running

exiftool -@ exifargs.txt

merely yields an output stating "No file specified".  I verified that the args file is being processed, so it seems the command line and arg options work differently somehow.

Why is this, and how can I make it work?  I cannot use batch processing since my to-be-converted images may be distributed across different source directories, so I need to run this for individual files.

I sense that understanding this effect might also help me understand how to make Exiftool execute properly from my C# program, so I'll be especially appreciative for any pointers and explanations.

Thanks, Lothar
Title: Re: Cannot get JpgFrom Raw conversion to run from args file
Post by: StarGeek on April 13, 2020, 05:10:58 PM
Make sure you read the docs on the -@ (Argfile) option (https://exiftool.org/exiftool_pod.html#ARGFILE) carefully.  You cannot just copy/paste the arguments.  Each argument needs to be on a separate line without quotes or extraneous spaces.  The redirect cannot be in the arg file as that is processed by the shell, not by exiftool.

Additionally, make sure you're using CMD, now Powershell.  Powershell corrupts binary data that is redirected or piped.
Title: Re: Cannot get JpgFrom Raw conversion to run from args file
Post by: lokatz on April 14, 2020, 03:10:39 AM
Thanks!