Author Topic: Modify Date Taken from filename in video  (Read 460 times)


  • Newbie
  • *
  • Posts: 2
Modify Date Taken from filename in video
« on: June 24, 2020, 10:58:22 PM »
I converted all my home video's with Handbrake but the "Date Taken" field has changed to a recent date.

The filename for example is 'Vid 20160131 204350' and with Advanced Renamer i changed Modify, Create, Last Opened but Date Taken still stays the same.

Is there an command in my case? I hope so because this give me sorting problems in OneDrive.

I tried "-datetimeoriginal<filemodifydate" -P -overwrite_original DIR" without any succes.

See attachments.

Thank you very much.


  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 5242
Re: Modify Date Taken from filename in video
« Reply #1 on: June 24, 2020, 11:25:57 PM »
While DateTimeOriginal exists in video files, it's not the tag that Windows reads (Apple Photos does but also needs a timezone).

Handbrake will change these tags to the current time (not sure if it's when the writing starts or ends)

The first is the one that Windows will read and display under Properties, though you can change the others as well.

I'm guessing that the filename is the date/time that you want the video to be set to?  If so, you could run this command:
exiftool -api QuickTimeUTC "-CreateDate<Filename" /path/to/files

If you wanted to update all the above timestamps, you could use
exiftool -api QuickTimeUTC "-CreateDate<Filename" "-ModifyDate<Filename" "-Track*Date<Filename" "-Media*Date<Filename" /path/to/files

These commands create backup files.  Add -Overwrite_Original to suppress the creation of backup files.  Add -r to recurse into subdirectories. 
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.


  • Newbie
  • *
  • Posts: 2
Re: Modify Date Taken from filename in video
« Reply #2 on: June 25, 2020, 08:42:39 AM »
Thank you so much sir for contributing in your free time to help other people! It works, changed hundreds of video's in a few seconds ❤.