Author Topic: Extract XMP raw file name to rename file  (Read 1868 times)

DirkM

  • Newbie
  • *
  • Posts: 2
Extract XMP raw file name to rename file
« on: August 13, 2013, 04:40:00 PM »
Hi,

my hdd crashed and I had to recover my photos (Nikon D7000). Most of the photos are now renamed by the recovery software, but I found out, that the original file name is still stored in the "XMP:raw file name" tag.

How could I write a batch file to extract the original filename to the rename the file?

Kind regards,
Dirk

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16664
    • ExifTool Home Page
Re: Extract XMP raw file name to rename file
« Reply #1 on: August 13, 2013, 07:05:28 PM »
Hi Dirk,

Try this:

exiftool "-filename<rawfilename" DIR

where DIR is the name of the directory containing the images.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DirkM

  • Newbie
  • *
  • Posts: 2
Re: Extract XMP raw file name to rename file
« Reply #2 on: August 14, 2013, 01:43:34 PM »
Hi Phil,

thank you for your fast reply!

I'm happy! It worked as it should.

Dirk