Output tab with -p "FormatString" on Windows

Started by Luuk2005, September 24, 2020, 04:10:59 PM

Previous topic - Next topic

Luuk2005

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.
Windows8.1-64bit,  exiftool-v12.92(standalone),  sed-v4.0.7

StarGeek

You could use the -t (-tab) option with -s (short) option

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).
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Luuk2005

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!
Windows8.1-64bit,  exiftool-v12.92(standalone),  sed-v4.0.7

Phil Harvey

This is a question for your shell.  Most shells use tab for auto completion of the current word.  This StackOverflow post shows how to defeat this feature to get a tab on a Unix command line.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Luuk2005

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!
Windows8.1-64bit,  exiftool-v12.92(standalone),  sed-v4.0.7