Main Menu

Putting a separation

Started by evilaro, November 21, 2012, 12:34:08 PM

Previous topic - Next topic

evilaro


Hi:

Using this code I get correctelly the filename and the keyword.

      RUN(FALSE, 'exiftool -p  "$filename $keywords" "&MDIR" > R2.txt')

But first gives me the filename as asked, and then the keywords

Something like:

mypicture hometown.jpg my house, Dogs, cities

So extracting the keywords is easy, but the first one (specially if is a 2 word) is to me unsure.

I thought to add something to separate ...example

      RUN(FALSE, 'exiftool -p  "$filename ::: $keywords" "&MDIR" > R2.txt')

And I get
mypicture hometown.jpg ::: My house, Dogs, cities

Which is what I wanted.... IS THIS ACEPTABLE?

Thanks
Emilio

www.evilfoto.eu
*************

Phil Harvey

Hi Emilio,

I'm confused about the question.  You are the one who needs to decide if this format is acceptable.  ExifTool doesn't care one way or the other what format you specify.

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

evilaro

Phil:

I feel I have not placed the question correctely.

Putting something like the    :::  in the middel of the tag,  does not seemed to me as correct... but it works.

My question is if doing that will not break any rules of exiftool?

Emilio




Quote from: Phil Harvey on November 21, 2012, 01:17:25 PM
Hi Emilio,

I'm confused about the question.  You are the one who needs to decide if this format is acceptable.  ExifTool doesn't care one way or the other what format you specify.

- Phil
www.evilfoto.eu
*************

Phil Harvey

Hi Emilio,

It is not possible to break the syntax rules for a -p format string.  The only result is that it doesn't behave as expected.  But since it behaves as you want, then everything is OK.

If you get an unexpected result, you should also get a message like "Tag not defined" (when the tag you want really exists).  If this ever happens, just put curly brackets around the tag name.  ie. ${filename}

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

evilaro

www.evilfoto.eu
*************