Le 09/11/2018 à 23.49, Bernhard a écrit :
Anton Aylward schrieb am 09.11.18 um 16:42:
How i can rename xmp-files? with sed?
You can't on the face of it.
Sed is a file CONTENT editor. the best you can do is 'save-as'.
It is a completely inappropriate tool for renaming.
not really since if you rename a file already imported to dt you have
to rename the xmp, too.
Thing is that the xmp also *contains* the filename of the RAW and
therefore the *content* of the xmp[1] must also be changed.
The script I mentioned in another reply calls exiftool.
I have also written a script that takes care of :
* finding matching xmp file,
* the xmp renaming to match the file it refers to,
* *and* adjust inside the XMP the reference to original image file name,
to match the new original file name.
It also works even when called after-the-fact, when files have been
mass-renamed and moved around in other directories, when xmp files have
broken references. It relies on the XML file having the common part of
the filename (like DSC_1234, aaa_2102, etc).
If people show interest, I might clean that up and publish.
--
Stéphane Gourichon
____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to [email protected]