ExifTool Forum

ExifTool => Newbies => Topic started by: tommyzebman on February 24, 2019, 12:04:58 PM

Title: When are " " needed around writing commands? Clarification.
Post by: tommyzebman on February 24, 2019, 12:04:58 PM
Just wanted to confirm that " " are not needed when writing data to a tag such as:  exiftool   -imagenumber=2222  "DIRsource"   ,  however, always required when copying data from one tag to another tag.

Such as:  exiftool   "-imagenumber<filenumber"  "DIRsource"   I do not see this written down/explained anywhere, but probably missed it.  I use Windows so always  " " vs. ' ' I believe.

The logic evades me, but that is not important, rather that I know the rules for sure.

Thanks for the clarification.
Title: Re: When are " " needed around writing commands? Clarification.
Post by: Phil Harvey on February 24, 2019, 12:28:05 PM
Quoting is a feature of the Windows shell you are using.  For cmd.exe, you need to quote spaces and some other characters.  No quotes are needed at all if you put the command arguments inside an exiftool -@ argfile.

See this post by StarGeek (https://exiftool.org/forum/index.php/topic,9900.msg51448.html#msg51448) explaining when quotes are necessary in Windows.

- Phil
Title: Re: When are " " needed around writing commands? Clarification.
Post by: StarGeek on February 24, 2019, 12:32:01 PM
And again, I'm too slow :D

Quote
Such as:  exiftool   "-imagenumber<filenumber"  "DIRsource"   I do not see this written down/explained anywhere, but probably missed it.

You can find it under the -TAG<=DATFILE / -TAG<=FMT option (https://exiftool.org/exiftool_pod.html#TAG-DATFILE-or--TAG-FMT) or the following -TagsFromFile option (https://exiftool.org/exiftool_pod.html#tagsFromFile-SRCFILE-or-FMT), maybe elsewhere.  The key term is "Redirection", which is the special function of the command line with regards to the greater/less than symbols.