How to Convert a Folder List Into Word or Excel
- 1). Open a command line window by clicking "Start" on the task bar, clicking "Run" in the start menu and then entering "cmd" in the Run box that appears.
- 2). In the command line, navigate to the folder containing the items you want to list using the CD command (for example, CD \ will move to the root folder, or use CD \<folder> to move to the given folder).
- 3). Run the following DIR command: "DIR *. > list.txt" to generate a list of all files with no extension (a list of just the folders) and save it in the file list.txt. The DIR command has many other parameters that can be applied to give listings in different formats, different sort orders and to even list files in all sub-folders. Use the command "DIR /?" to get a summary of the options.
- 4). Locate the file list.txt on your computer and right-click on it. From the pop-up menu, click "Open With," then click on "Choose Program." In the Choose Program dialog, locate Microsoft Word and click on it. Click "OK." The file can now be edited and formatted just as any other Word document.
- 5). Open the output file in Excel by first launching Excel, then click on the "Data" tab at the top and click the "From Text" button.
- 6). Browse to the output file and double-click on it. In the "Import Text Wizard" dialog that comes up, choose the "Fixed Width" option and click the "Next" button. On the next screen, in the "Data preview" portion, click on the line at position 50 and drag it off of the white area to remove it. When the lines are positioned correctly, click "Next." Click the "Finish" button to finish the text import wizard. The file will now be imported with the file date in column A, the time in column B, the file size in column C and the file name in column D.
Source...