ExifTool Forum

ExifTool => Developers => Topic started by: johnbeardy on August 10, 2020, 01:51:52 AM

Title: Output to > file in an argument file
Post by: johnbeardy on August 10, 2020, 01:51:52 AM
Can I specify an output text file when using an argument file?

I am using argument file with some non-Latin filenames. So my arguments file Instructions.txt looks like this:
R:\Landing zone\MOVs\Video\Хабаровске.MOV
> C:\Users\John\Documents\Output.txt
-n
-g
-J


The command line is like this:
"C:\Users\John\...exiftool.exe" -charset filename=utf8 -@  "C:\Users\John\...Instructions.txt" -k

The Exiftool cmd window shows that the Cyrillic file is being read, but I get "Error - file not found" for the Output file.

Any thoughts?

Title: Re: Output to > file in an argument file
Post by: mnaoumov on August 10, 2020, 02:21:20 AM
John, please try the following

R:\Landing zone\MOVs\Video\Хабаровске.MOV
-charset
filename=utf8
-n
-g
-J
-w
C:\Users\John\Documents\Output%c.txt
Title: Re: Output to > file in an argument file
Post by: StarGeek on August 10, 2020, 02:35:04 AM
Using the > sign to output to a file is a property of the CMD shell and won't work in an argument file because CMD isn't used to process the file. @mnaoumov example using the -w (textout) option (https://exiftool.org/exiftool_pod.html#w-EXT-or-FMT--textOut) is probably the best solution.
Title: Re: Output to > file in an argument file
Post by: johnbeardy on August 10, 2020, 04:03:46 AM
Thanks both. I've modified slightly to overwrite existing extracts, and put the -charset filename=utf8 lines in the Exiftool command line.

R:\Landing zone\MOVs\Video\Хабаровске.MOV
-n
-g
-J
-w[b]![/b]
C:\Users\John\Documents\jb Video Metadata\Read[b] %f[/b].txt