as a next step of this topic http://www.noodlesoft.com/forums/viewtopic.php?f=4&t=2021
I´m am now able to do it the other way around and set xmp-tags to a pdf-file by parsing an xml-file.
I use exiftool within an applescript that looks like this.
- Code: Select all
set pdffile to quoted form of (POSIX path of theFile) as string
do shell script "exiftool -overwrite_original -TagsFromFile " & "/Volumes/Produktion/Druckdaten_Eingang/36503/36503.xml" & " -XMP:all " & pdffile
This first version of the script works, but what I need now is a variable for the xml-file so that the script can be changed to this
- Code: Select all
do shell script "exiftool -overwrite_original -TagsFromFile " & xmlfile & " -XMP:all " & pdffile
The xml is located in the same folder as the triggered pdf ("thefile"), here .../36503/
The parent folders name is always five numbers but changes from job to job.
So maybe the variable could be built like this:
set parent to Parentfolder of thefile
set xmlfile to parent & /*.xml
[*] = wildcard for the xml´s name.
Can anyone help me transfering this to working code ?
Thanks a lot ...
Graf_Wetter