Clarification about XMP sidecar creation

Started by Archive, May 12, 2010, 08:54:33 AM

Previous topic - Next topic

Archive

[Originally posted by jaypng on 2009-03-21 15:45:44-07]

In the web site is written that exiftool is able to create XMP sidecars from scratch but the examples only show how to create them by copying or extracting from an image that already contains metadata.

If this is true then exiftool is not able to create them from scratch. Is this true?

Archive

[Originally posted by exiftool on 2009-03-21 19:19:45-07]

Commands like this will create the xmp file if it doesn't already
exist:

Code:
exiftool -creator=me a.xmp

Maybe this is what you had in mind.

- Phil

Archive

[Originally posted by jaypng on 2009-03-21 19:53:34-07]

I was thinking the following: If exiftool could create the xmp sidecars from scratch, then I could create them for any file type therefore adding metadata to any file.

Something like exiftool *.* *.xmp

This would create an xmp file for every file that exists. The command that you provided gives me some hope. This creates an "isolated" xmp. Can this be adapted to create a sister (with the same name) xmp for every other file like: textfile.txt/textfile.xmp?

I would add metadata to the xmp files.

For one file this works. But I have thousands of files.

The files are in this type of folder structure Author/Title/

Inside each Title folder exists dozens of files of several types: image; text; pdfs; etc...

These cannot be modified.

If exiftool could create an sister xmp file for each one of this files, I could use exiftool to add the folder "author" and folder "title" names to each xmp recursively.

To manage this information I would then use iView Media Pro/Expression Media. It detects any xmp sidecar file no matter the filetype.

If this is possible then it would be amazing and would save a lot of work.

Thank you.

Archive

[Originally posted by exiftool on 2009-03-21 22:42:53-07]

Of course you can do this too, but you said:

"but the examples only show how to create them by copying
or extracting from an image that already contains metadata
"

So I gave you an example that didn't use a source file.

But now you want to use a source file and create a sidecar XMP.
So aren't we back to the example again?:

Create XMP meta information data files for all images in dir:
Code:
exiftool -o %d%f.xmp dir

- Phil

Archive

[Originally posted by jaypng on 2009-03-22 12:59:08-07]

But now you want to use a source file and create a sidecar XMP. So aren't we back to the example again?

No, not the source file exactly, only it's name. The filename of the xmp must match the filename of the source.

Yes, it must create a companion xmp file for another file. But it doesn't need to extract nothing from it. The command you gave still extracts information from files therefore doesn't work with every filetype.

The command you gave me almost works: it creates an companion xmp with the same name of it's master. These include HTM; ZIP; M4A. But not for all filetypes. It didn't work for example with RTF and TXT. Is there a way to make it work with every filetype?

For every "filename.xxx" create "filename.xmp"

Perhaps I can't explain myself correctly. Believe me I'm not trying to deceive you. I'm grateful for all the help and patience you gave me.

Archive

[Originally posted by exiftool on 2009-03-22 15:15:16-07]

I think I understand now.  Unfortunately exiftool will give
an "Unknown file type" error and not write an output XMP
if you force it to process output files that it doesn't recognize.

So I don't think you can do what you want using ExifTool.

- Phil

Archive

[Originally posted by jaypng on 2009-03-22 19:33:59-07]

I was able to achieve what i wanted in roundabout way. The steps:

Code:
exiftool -w xmp -Filename "c:\A\*\*\*.*"

This will create a xmp file for each existing file containing a line: "Filename: filename.ext"

Then I used a search and replace program to replace that line with an xmp file structure

I then add metadata to that xmp files:

Code:
exiftool -L "-title<$Directory" "c:\A\*\*\*.xmp"

I use the "-L" because otherwise the accented characters would become "?"

I have still a problem: when using "Directory" the whole path is added "c:\A\Author\Title\" but I just want the "Title" part. Is there any to separate parts of the Directory path?

Archive

[Originally posted by exiftool on 2009-03-23 11:14:37-07]

Pretty smart.

http://www.cpanforum.com/threads/9492" target="_blank">See this
thread for a description of how to solve your directory
name question.

- Phil