Page 1 of 1

Encoded date from YouTube video .MP4 to filename script

Posted: 29 May 2020 12:06
by Radim
I want to rename MP4 videos from YT (YouTube.com) with encoded date in new filename.

When I download video from YT it contains this info - https://i.imgur.com/3RYRAwF.png
I want a script that rename file from "Photopia Director Promo.mp4" to "2020-01-29 Photopia Director Promo.mp4" - https://i.imgur.com/7cfiJo1.png

Please help, I am a new to XYplorer. :eh: Thanks.

Re: Encoded date from YouTube video .MP4 to filename script

Posted: 29 May 2020 12:29
by highend
Adapt the path to MediaInfo.exe in the script (this is the CLI version of MediaInfo!)...
https://mediaarea.net/en/MediaInfo/Download/Windows

Code: Select all

$date = gettoken(runret("""D:\Tools\@Command Line Tools\MediaInfo\MediaInfo.exe"" --Inform=General;%Encoded_Date% ""<curitem>"""), 2, " ", "t");
    if ($date) { renameitem($date . " " . gpc(<curitem>, "base"), <curitem>); }

Re: Encoded date from YouTube video .MP4 to filename script

Posted: 29 May 2020 13:47
by Radim
Thank you. I will play with it.