News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

How to rename sidecar files?

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

Previous topic - Next topic

Archive

[Originally posted by toosubtle on 2007-01-21 06:12:09-08]

I'm trying to rename raw files that have XMP sidecars created by photoshop.  Exiftool will rename the NEF file, but won't touch the XMP (see below).  How do I get it to rename both?

More generally (once I get this working), I'd like to rename all files that match the base filename of the NEF to be the same (e.g. I've got foobar.{nef,xmp,jpg,psd} and I want to rename them to %Y%m%d-%%c.{nef,xmp,jpg,psd}).

Here's what I'm finding right now:

Code:
C:\src\renpics\test\src>exiftool -ver
6.69

C:\src\renpics\test\src>dir /b
exiftool.exe
_DSC9547.NEF
_DSC9547.xmp

C:\src\renpics\test\src>exiftool -d "RM%Y%m%d.%%e" "-filename<CreateDate" .
    1 directories scanned
    1 image files updated
    1 image files unchanged

C:\src\renpics\test\src>dir /b
exiftool.exe
RM20060809.NEF
_DSC9547.xmp       <---- not renamed

C:\src\renpics\test\src>

I suspect the problem is that the XMP doesn't include CreateDate.  Even if that's the case, I still need to rename both as renaming only the NEF effectively eliminates the metadata in the XMP.  

Thanks!

Archive

[Originally posted by exiftool on 2007-01-21 14:09:26-08]

You should be able to do this by specifying the NEF as the source
file for the -tagsfromfile option.  For example:

Code:
exiftool -tagsfromfile "%d%f.NEF" -d "RM%Y%m%d.%%e" "-filename<CreateDate"

Then all recognized files will get renamed according to the
CreateDate in the corresponding NEF file.  It won't be all that
fast, because the NEF will be reprocessed for each file, but it
should do exactly what you want.  (Isn't it nice that exiftool
is so flexible? Smiley )

- Phil