using -@ ARGFILE throws INVALID TAG error
nemethviktor opened this issue · 2 comments
Hi there,
I'm trying to use an arguments file for writing tags with exiftool/ASET. The file contents is set up okay and when executing from traditional cmd (just using exiftool -@ exifArgs.args d:\temp\sample1.pef
it's working fine.
When I use the logic var result = await asyncExifTool.ExecuteAsync(new[] { "-@ exifArgs.args", Path.Combine(folderName, lvi.Text) });
or any version of var exifToolCommand = new[] { "-@ exifArgs.args" };
the script throws an invalid tag error.
How do I overcome this?
Thanks
ps i've enabled logging.:
20:57:03 Info Initializing
20:57:03 Trace Added shells ProcessExited event handler.
20:57:03 Trace Start initialising shell
20:57:04 Info Initialized
20:57:04 Debug ExecuteAsync - Wait before entering executeAsyncSyncLock.
20:57:04 Debug ExecuteAsync - Entered executeAsyncSyncLock.
20:57:04 Trace WriteLineAsync: -@ exifArgs.args
20:57:04 Trace WriteLineAsync: D:\temp\sample1.pef
20:57:04 Trace WriteLineAsync: -execute1
Exception thrown: 'System.Exception' in mscorlib.dll
An exception of type 'System.Exception' occurred in mscorlib.dll but was not handled in user code
Invalid TAG name: "@ exifArgs.args"
Hi, i'm not sure if and how this works with argument files. I didn't used them at the time.
No worries. I ended up figuring it out -> instead of putting the arg file into the array of elements it needs to be faked to be a long element.
As in not
[0] = -something
[1] = -@ args
but instead:
[0] = "-something - @ args"