Save some tags in other tags for many files

Started by WinkFace, September 18, 2012, 01:17:20 AM

Previous topic - Next topic

WinkFace

perl c:\windows\exiftool.pl   -XMP:Section="Author"   -XMP:SubSection1="OriginalName = "$filename   -XMP:SubSection2="Directory = $folderpath" *.jpg

Hi,
Thanks for this software and your attention to new users. I have some simple issues.
I Can't get subsections to combine text and tags, first of all.
Next, what is listed as a folder path in the properties-details pane comes across as a dot in the directory tag.
How do I update the directory tag with the value of the 'folder path' tag (which the exiftool doesn't list)?
    OR, How do I update the directory tag with the real directory path?
And how do I cat those text and tags?
For rec work, do I list the directory (dir) as the top directory? For example....
            exiftool  [[stuff i'm doing]]   -r   "C:\working\foto"

Lastly, what are the options for 'tagsfromfile'.

again, thanks in advance....

WinkFace

Thanks,  Populating the directory tag seems to be from     -r "C:\Users\Edhp\Desktop\Sub"  as the top directory, all the files have the correctory directory down though the sub-directories ???  I guess

Phil Harvey

Seems like you figured out the directory problem.  The directory reported by ExifTool is based on the directory you specify on the command line.

After the -tagsFromFile option you can specify the tags you want copied.  See the application documentation for details.

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

WinkFace

Thanks for the rapid reply, yes I did finally see the solution for the directory issue. As with most things in this tool - it was a logical, simple answer. I'm still working on the combining text and a tag value to populate a new tag thing.

With me, it really is the journey. I started looking into Perl again and reusing my three computers (Ed, Edd, Eddie) for things other then paper weights. It's good to be busy in my old age and to think again... Thanks... My oldest son said he saw a change in my outlook - that's worth the weeks I'v spent on this project.

However, there is still the text-tag > new tag issue; but I'll work on this too with maybe a hint from you, please...

-WinkFace

Phil Harvey

I saw your comment "I Can't get subsections to combine text and tags".  Is this what you are talking about?  If so, then I don't understand the question.

If you mean how to write new values that are combined text and tags, the -tagsfromfile documentation explains all this:

            An extension of the redirection feature allows strings involving
            tag names to be used on the right hand side of the "<" symbol with
            the syntax "'−DSTTAG<STR'", where tag names in STR are prefixed
            with a "$" symbol.  See the −p option for more details about this
            syntax.  Strings starting with a "=" sign must insert a single
            space after the "<" to avoid confusion with the "<=" operator
            which sets the tag value from the contents of a file.  A single
            space at the start of the string is removed if it exists, but all
            other whitespace is preserved.


and the relevant section from the -p documentation:

            [...] Tag names in the format file or string begin with a "$"
            symbol and may contain a leading group name and/or a trailing "#". 
            Case is not significant.  Braces "{}" may be used around the tag
            name to separate it from subsequent text.  Use $$ to represent a
            "$" symbol, and $/ for a newline.


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