ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: mstorhas on September 05, 2011, 10:57:57 AM

Title: tag content with linebreaks starting with a hyphen
Post by: mstorhas on September 05, 2011, 10:57:57 AM
Hi,
I'm using exiftool via the command line interface in a windows environment. In order to overcome issues with linebreaks in tag content, I use the redirect operator in combination with $/, e.g.
exiftool -o b.jpg "-IPTC:SpecialInstructions<line1$/line2" a.jpg
This works fine, as long as the tag content does not start with a hyphen:
exiftool -o b.jpg "-IPTC:SpecialInstructions<-line1$/line2" a.jpg
which will yield
QuoteError: Can't redirect excluded tag - a.jpg
. Obviously exiftool interprets the hyphen as an
Quoteexclude tag
directive. Is there an easy way to get around that issue? Without having to use files to read tag content from?
Thanks, Martin
Title: Re: tag content with linebreaks starting with a hyphen
Post by: Phil Harvey on September 05, 2011, 12:46:00 PM
Hi Martin,

I can't reproduce this problem in a Mac Terminal:

> exiftool -o b.jpg '-IPTC:SpecialInstructions<-line1$/line2' a.jpg
    1 image files created

> exiftool b.jpg -iptc:specialinstructions -b
-line1
line2


I had to change the quotes for the Mac, but I don't see why this should work differently in Windows.

My only guess is that you are using an old version of ExifTool, and that this problem may have been fixed.  The current version is 8.63.

- Phil
Title: Re: tag content with linebreaks starting with a hyphen
Post by: StarGeek on September 05, 2011, 06:57:04 PM
I just tried this on my windows machine, version 8.61 and the hyphen was added into the file with no error.
Title: Re: tag content with linebreaks starting with a hyphen
Post by: mstorhas on September 06, 2011, 03:32:30 AM
Yep! I was using 8.4.1, sorry for the hassle...

Great tool and service!

Regards, Martin