ExifTool Forum

ExifTool => Newbies => Topic started by: gunasilan on October 29, 2014, 11:57:26 PM

Title: Unable to write Metadata with double quote, slash and asteriks
Post by: gunasilan on October 29, 2014, 11:57:26 PM
exiftool  "-Description=5902455501949_XXXX Basics 20" Tool Box" "C:\Production Art\Test.ai"
Above code is used to write description. Its working fine until there was special character in the value. For above example there was double quote in the value. It stores empty value in the description. I tried with -E like this:
exiftool -E "-Description=5902455501949_XXXX Basics 20" Tool Box" "C:\Production Art\Test.ai" but it still same. How do I solve this. Please advice. Thanks.
Title: Re: Unable to write Metadata with double quote, slash and asteriks
Post by: Hayo Baan on October 30, 2014, 03:14:24 AM
Your example doesn't work because the quote is mismatched, inside the description you'll need to escape it (on Unix/Mac that would be a simple \, but I'm not sure any more that works on Windows). However, with the -E option, you can replace the quote in the description with " I think that will do the trick ;)
Title: Re: Unable to write Metadata with double quote, slash and asteriks
Post by: StarGeek on October 30, 2014, 05:17:30 AM
A backslash should also work  on windows.  I say should because I came across one occasion where it didn't work and couldn't figure out why, but every other time it's worked for me.  -E and " have always worked for me, though.

Slashes and asterisks shouldn't be a problem though.
Title: Re: Unable to write Metadata with double quote, slash and asteriks
Post by: gunasilan on October 30, 2014, 07:02:18 AM
exiftool -E "-Description=5902455501949_XXXX Basics 20\" Tool Box" "C:\Production Art\Test.ai"
and
exiftool &quot "-Description=5902455501949_XXXX Basics 20\" Tool Box" "C:\Production Art\Test.ai"
Doesn't work for me. The description is empty. I'm working in Window environment.
Title: Re: Unable to write Metadata with double quote, slash and asteriks
Post by: Hayo Baan on October 30, 2014, 07:20:45 AM
You misinterpreted the suggestions. Try this:
exiftool -E "-Description=5902455501949_XXXX Basics 20" Tool Box" "C:\Production Art\Test.ai"
this should work  ;)
Title: Re: Unable to write Metadata with double quote, slash and asteriks
Post by: StarGeek on October 30, 2014, 05:25:49 PM
I'm not sure why the first option didn't work, though.  I copy/pasted it, replaced your .AI file with my test jpg (I don't have an .AI file) and it worked for me


c:\>exiftool -E "-Description=5902455501949_XXXX Basics 20\" Tool Box" x:\!temp\Test.jpg
    1 image files updated

c:\>exiftool -description x:\!temp\Test.jpg
Description                     : 5902455501949_XXXX Basics 20" Tool Box


Either way, go with Hayo's suggestion, it should work the best.
Title: Re: Unable to write Metadata with double quote, slash and asteriks
Post by: gunasilan on October 31, 2014, 03:31:34 AM
exiftool -E "-Description=5902455501949_XXXX Basics 20" Tool Box" "C:\Production Art\Test.ai"
Works fine for me. Thanks everyone. :)