ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: pitchfork on April 22, 2013, 04:19:47 AM

Title: [solved] Delete sidecar XMP after restore
Post by: pitchfork on April 22, 2013, 04:19:47 AM
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
Title: Re: Delete sidecar XMP after restore
Post by: Phil Harvey on April 22, 2013, 06:38:28 AM
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
Title: Re: Delete sidecar XMP after restore
Post by: pitchfork on April 22, 2013, 07:34:32 AM
Hi Phil,
looks good! I will test ASAP and will report back.

Thanks for exiftool so far!

Joerg
Title: Re: Delete sidecar XMP after restore
Post by: pitchfork on April 22, 2013, 08:33:47 AM
Hi Phil,
works like a charm!

Thanks a lot.

Joerg