-t and -T trimming trailing spaces

Started by StarGeek, February 21, 2020, 02:22:56 PM

Previous topic - Next topic

StarGeek

A post on StackOverflow is asking about the output of space only tags in `-T` output.  Exiftool seems to trim any trailing spaces with that output. 

So the question there is it possible to show trailing spaces using the  -t or -T 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

Phil Harvey

You can use the (undocumented) -ec option (ExifTool 11.54 or later) to escape control characters using C-style escape sequences and preserve trailing newlines, nulls and newlines, etc

An advantage of this is that a tab character inside a value won't mess up the -T formatting.

- 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 ($).

StarGeek

Cool.

I do what I can over there to answer exiftool questions (I have a weird idea of fun) and that's one I just couldn't figure out a workaround for.
"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

Phil Harvey

Too bad I made a typo. :P  I meant "trailing spaces, nulls and newlines, etc"

- 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 ($).