Script Patterns by Riley

How to extract the date from the "Media Created" column of a video file

Problem Statement: Extracting extended file properties, such as the Media Created Date, is necessary for certain applications. Utilizing the Microsoft.WindowsAPICodePack.Shell namespace facilitates this task efficiently.

Approach: Utilize the ShellObject class from the WindowsAPICodePack.Shell namespace to access extended file properties. Specifically, retrieve the Media Created Date using the System.Media.DateEncoded property.

using Microsoft.WindowsAPICodePack.Shell;

ShellObject shell = ShellObject.FromParsingName(path);
var mediaCreatedDate = shell.Properties.System.Media.DateEncoded;

Explanation: This code utilizes the ShellObject class to access extended file properties. It fetches the Media Created Date of a file specified by its path using the System.Media.DateEncoded property, providing crucial metadata for various applications.

Further resources

Comments (1)

Mike Taft

5/15/2024 7:22:17 AM
Hi there, My name is Mike from Monkey Digital, Allow me to present to you a lifetime revenue opportunity of 35% That's right, you can earn 35% of every order made by your affiliate for life. Simply register with us, generate your affiliate links, and incorporate them on your website, and you are done. It takes only 5 minutes to set up everything, and the payouts are sent each month. Click here to enroll with us today: https://www.monkeydigital.org/affiliate-dashboard/ Think about it, Every website owner requires the use of search engine optimization (SEO) for their website. This endeavor holds significant potential for both parties involved. Thanks and regards Mike Taft Monkey Digital

Leave a Comment

All fields are required. Your email address will not be published.