Author Topic: Filename to time and camera tags?  (Read 1266 times)

dr kay

  • Newbie
  • *
  • Posts: 1
Filename to time and camera tags?
« on: July 09, 2014, 03:52:08 PM »
Hi everyone,
I have a bunch of files (3000+) named YYYY.MM.DD_HH.MN_CAMERAID(5 symbols)_OriginalFileNumber.MP4
Can I transfer the YYYY.MM.DD and HH.MN to the creation date/time, CAMERAID to the Camera tags? And if yes, how can I do this?
Thank you in advance for any help!


Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 18144
    • ExifTool Home Page
Re: Filename to time and camera tags?
« Reply #1 on: July 09, 2014, 05:34:07 PM »
ExifTool only really writes XMP to MP4 videos.  I'm not sure exactly what tags you want to write.  But the command could look something like this:

exiftool "-XMP:CreateDate<FileName" "-XMP:Description<${FileName;my @a=split('_');$_=$a[2]}" -ext mp4 DIR

where DIR is the name of a directory.  The above quoting is for Windows.  Swap the single and double quotes if you are on Mac or Linux.

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