How to Copy a List of Files in a Windows Folder into an Excel Spreadsheet

Step 1

Press “Win-E” to open Windows Explorer and locate the folder for which you need a file list.

Step 2

Hold the “Shift” key, right-click the folder and select either “Open Windows PowerShell Here” or “Open Command Window Here” depending on your version of Windows and your default command program. If PowerShell opens, type cmd for Command Prompt to open inside PowerShell.

Note – This only works with folders, not libraries. Libraries point to a specific folder, so select the folder located under the library icon. If the library points to a drive, right-click the drive letter from the folder tree.

Step 3

To include all files and sub-directories, type “dir /b /s > dirlist.txt” without quotes

Step 4

Open Microsoft Excel and Click File and then Open. Navigate to the file that’s just been created (It will be in the route of the folder you right clicked on and opened Command Prompt) and click the drop down at the bottom right and click All Files, this will then show the txt doc.

Step 5

When the Text Import Wizard opens click Delimited and click Finish

 

Leave a Reply