-overwrite_original does not work for xmp output

Started by HansS713, October 27, 2014, 07:38:34 AM

Previous topic - Next topic

HansS713

It should be possible to overwrite existing xmp files, but command:

exiftool -m -XMP-mwg-rs:all -o %d%f_XMP-mwg-rs.xmp -overwrite_original -ext jpg -r "."

gives e.g.:
Error: './20140808_Button_Reaction_XMP-mwg-rs.xmp' already exists - ./20140808_Button_Reaction.JPG

and -o! does not work (and -overwrite_original_in_place gives "Can't overwrite in place when -o option is used").

exiftool v9.74
Win7pro-64 SP1

Phil Harvey

The -o option is used mainly for image file output, and overwriting random image files is something that I don't want ExifTool to ever do.

The -overwrite_original in your example refers to the original file, not whatever file was specified by -o,

You should delete this file yourself if you want to overwrite it.

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

HansS713

For me it's not logical that exiftool does not allow to overwrite existing *.xmp files. It's not easy to make a script which would find all files in same way as exiftool would do using -ext and -r. I think -overwrite_original or -o! should work for xmp output (but in my use-case I can simply delete all xmp files as you suggested).