Use contents of a tag + my own text in a single command?

Started by philbond87, February 03, 2023, 03:34:56 PM

Previous topic - Next topic

philbond87

I'm trying to figure out how (or even if it's possible) to take the contents of a tag – ImageSize, for example – and prefix that with some other string characters.

Essentially I'm trying to use the a file's tag value as a variable, adding additional text to it, then putting the results into some other tag... all in one line.

Is that possible?

Thanks

philbond87

I believe I have stumbled upon (a) solution:

Although what I'm doing is somewhat specific to Swift, the end result seemed to be to use -if $SomeTag -SomeOtherTag<${SomeTag} (... then add my additional text)

Phil Harvey

#2
You don't need the -if.  If SomeTag doesn't exist then SomeOtherTag won't get written (unless you use the -f or -m option).

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