Encoded date from YouTube video .MP4 to filename script

Discuss and share scripts and script files...
Post Reply
Radim
Posts: 12
Joined: 30 May 2019 19:47

Encoded date from YouTube video .MP4 to filename script

Post 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.

highend
Posts: 13313
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

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

Post 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>); }
One of my scripts helped you out? Please donate via Paypal

Radim
Posts: 12
Joined: 30 May 2019 19:47

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

Post by Radim »

Thank you. I will play with it.

Post Reply