[solved] Delete sidecar XMP after restore

Started by pitchfork, April 22, 2013, 04:19:47 AM

Previous topic - Next topic

pitchfork

Hello,
I use exiftool Version 9.28 on windows to restore XMP sidecar files

We receive PDF + XMP Sidecar Files from Fotoware Fotostation and need to embed XMP data back into PDF Files. This works like a charm using exiftool.

Is there a way to remove the XMP File later on?

The current workflow is to execute

exiftool.exe -overwrite_original -tagsfromfile %d%f.xmp -xmp filename.pdf

So we want to delete %d%f.xmp because this file is no longer needed.

Is there a way doing this using exiftool directly?

Cheers Joerg

Phil Harvey

#1
Hi Joerg,

No, sorry.  You can't use ExifTool to delete sidecar files.  The closest thing I could suggest is to move it to a trash directory:

exiftool.exe -overwrite_original -tagsfromfile %d%f.xmp -xmp -execute -srcfile %d%f.xmp -filename="c:\trash\%f%c.xmp" -common_args filename.pdf

I also rename the file by adding a copy number if necessary to avoid collisions with other possible same-named files in the trash directory.

- Phil

Edit:  Fixed -srcfile spelling
...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 ($).

pitchfork

Hi Phil,
looks good! I will test ASAP and will report back.

Thanks for exiftool so far!

Joerg

pitchfork

Hi Phil,
works like a charm!

Thanks a lot.

Joerg