Power Query Listing of Files - Duration

brawnystaff

Board Regular
Joined
Aug 9, 2012
Messages
105
Office Version
  1. 365
I am using Excel 2016 and the "Get and Transform" feature (Power Query) to list files in a folder. By default, it gives file name, extension, date created/modified, attributes, and folder path. I have a directory full of videos shot from a Go Pro. Is it possible to add a custom column that would give me the length of each video file (run time)? Thanks.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I guess the closest you can get is using the file size.
In addition to the fields you mention, the file list also contains a column "Attributes" with records. If you expand this column, you can select field Size.
Suppose every 80,000,000 bytes represents about a minute of movie, estimated duration can be calculated as Duration.From([Size]/80000000/24/60).
 
Upvote 0

Forum statistics

Threads
1,216,468
Messages
6,130,800
Members
449,595
Latest member
jhester2010

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top