How to Export File Name, Size, and Length from File Explorer to Excel
Question details
The user wants to extract video file metadata (such as file name, size, and length) from a local directory into an Excel spreadsheet, creating one row per file.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating a spreadsheet directory or inventory of video files with their detailed properties.
- Observed behavior
- The user needs a reliable method to import multiple file properties from a folder into a structured Excel table without manual data entry.
Gather all the video or media files you want to list into a single folder on your computer to streamline the import process.
Use Excel Power Query to Extract File Data
Using the 'Get Data' feature is the recommended method for repeatable, automated file imports directly from a folder.
Power Query is a built-in Excel tool that allows you to connect to a folder and automatically extract the properties of all files inside it. This method is highly recommended because it can be refreshed later if you add or remove files.
In Excel, go to the 'Data' tab on the ribbon, select 'Get Data', choose 'From File', and then click 'From Folder'.
Browse your computer to locate the folder containing your video files, select it, and click 'Open'.
A preview window will appear. Click 'Transform Data' to load the file metadata table into the Power Query Editor.
Keep the 'Name', 'Size', and other relevant attribute columns. Right-click and remove any columns you do not need, then click 'Close & Load' to output the data to your Excel worksheet.

Use a Web Browser to Copy Directory Details
A quick workaround utilizing the Firefox web browser to generate a copyable list of files if you do not want to use Power Query.
Try WPS Office for Seamless Spreadsheet Management
If you frequently manage large data sets, file inventories, or complex imports, WPS Office is an excellent lightweight alternative. It offers a familiar interface, supports standard spreadsheet formats, and provides powerful data management features completely free.
- 1. Download WPS Office: Visit the official WPS website and click 'Download WPS Office Free'.
- 2. Install the application: Run the lightweight installer and follow the on-screen prompts to set up the software.
- 3. Open your spreadsheets: Launch WPS Spreadsheet and easily open or edit your existing .xlsx file inventories.

Frequently Asked Questions
Can I export file properties using a command prompt instead of Excel?
Yes. You can open Command Prompt, navigate to your target folder, and type 'dir /b /s > list.txt' to generate a text file of the directory contents. You can then import this text file into Excel using the Text Import Wizard.
Does the Power Query method automatically update if I add new videos?
Yes, Power Query creates a dynamic data connection. When you add new files to the linked folder, simply go to the Data tab in Excel and click 'Refresh All' to update the table with the latest file names and sizes.
Why doesn't the browser drag-and-drop method copy the video length?
A web browser's directory index typically only reads basic system file attributes like name, size, and date modified. It does not read deeper media metadata such as video length or audio duration.
Can I extract exact video length (duration) using standard Power Query?
Standard Power Query does not directly extract media-specific metadata like video duration from the file system. To get the exact media length, you may need to use a PowerShell script to extract the extended file properties before importing the results into Excel.




