ExifTool Forum

ExifTool => Newbies => Topic started by: Luuk2005 on September 24, 2020, 04:10:59 PM

Title: Output tab with -p "FormatString" on Windows
Post by: Luuk2005 on September 24, 2020, 04:10:59 PM
Greetings.  Is there a basic way to output tab like -p ${Tag1}\t${Tag2} ??
For now, Im use something like -p ${Tag1}${Filename;s/.*/\t/}${Tag2} but seek the easier way.
Title: Re: Output tab with -p "FormatString" on Windows
Post by: StarGeek on September 24, 2020, 04:27:23 PM
You could use the -t (-tab) option (https://exiftool.org/exiftool_pod.html#t--tab) with -s (short) option (https://exiftool.org/exiftool_pod.html#s-NUM--short)

exiftool -t -s2 -TAG1 -TAG2 /path/to/files/

Otherwise, you could create a Format File with with the tab at the appropriate place (see the -p (printFormat) option (https://exiftool.org/exiftool_pod.html#p-FMTFILE-or-STR--printFormat)).
Title: Re: Output tab with -p "FormatString" on Windows
Post by: Luuk2005 on September 24, 2020, 05:33:53 PM
Thanks StarGeek. Its unfortunate, but not all tags should neighbor with tab..  I must remember -t -s2 when it does!!
Im always try avoid -p "FormatFile", and spend much time trying to make commandline conduct things like -p $/#[HEAD]MyHeader$/ or even \n#[SECT]MySection\n.
But they never work accordingly from commandline, so it seems that FormatFiles will soon be inescapable.. Great support, and thanks for advice!
Title: Re: Output tab with -p "FormatString" on Windows
Post by: Phil Harvey on September 29, 2020, 06:22:10 AM
This is a question for your shell.  Most shells use tab for auto completion of the current word.  This StackOverflow post (https://stackoverflow.com/questions/6392249/how-to-enter-a-tab-char-on-command-line) shows how to defeat this feature to get a tab on a Unix command line.

- Phil
Title: Re: Output tab with -p "FormatString" on Windows
Post by: Luuk2005 on September 29, 2020, 07:47:43 AM
Thanks much to Phil Harvey! Im never use "completion", and cmd.exe turns it off with: cmd /f:off
Now Im use tab like any other character!! This was very long problem, so I make it my default.
Thanks again!