How to rename by "Media Created" property

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
handawanda
Posts: 1
Joined: 23 Nov 2019, 18:35

How to rename by "Media Created" property

Post by handawanda »

Hello! I am trying to batch rename a bunch of home movies, mostly filmed on my Timer. I'd like the files to be titled by the date they were filmed, for example, 2018-11-05. I found a script that will do this by the "Date Modified" property:

Code: Select all

{new Date(file.lastModified()).format('yyyy-MM-dd HH∶mm∶ss')}
Problem is, "Date Modified" or "Date Created" is not actually the date the video was filmed. That date is found under Properties in "Media Created."

Does anyone have a script that will allow me to re-name by "Media Created" ?

Thanks!!
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: How to rename by "Media Created" property

Post by kim »

Look if your files has this data:
viewtopic.php?t=4285

e.g.

Code: Select all

{media.File_Created_Date_Local}
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to rename by "Media Created" property

Post by rednoah »

Note that Last-Modified and Creation-Date refer to file system properties. When the file was modified, and when the file was created, which is unique to your system, and has nothing to do with movie release date, or file encoding date, etc.


You're probably looking for the EncodedDate value which is embedded in the file itself:

Code: Select all

{media.EncodedDate}
:idea: Please read the FAQ and How to Request Help.
Post Reply