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

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 "Open Command Window Here." 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.
Type "dir /b > dirlist.txt" without quotes and press "Enter." This creates a list containing file names only. To include file sizes and dates, type "dir > dirlist.txt" instead. To also include files in sub-directories, type "dir /b /s > dirlist.txt" to create a list of files with the full directory structure name, such as "C:\folder\subdirectory\file.txt."
Step 4
Open Microsoft Excel and press "Ctrl-O" to bring up the Open dialog window.
Step 5
Navigate into the folder containing the files. Click the file type drop-down menu and select "Text Files (*.prn,*.txt,*.cvs)." Double-click "dirlist.txt" to open it.
Step 6
Click "Finish" in the Text Import Wizard window to use the default options and import the directory list into Excel.

Comments