Scenario: You have a Windows folder containing a large amount of files that you need to have exported into one text file listing all the filenames. For instance, you might need to copy & paste those filenames into an Excel spreadsheet.
Here’s a quick and easy way to do it:
1. Open a Command Window (Start > Run > cmd)
2. Navigate to the folder by using the cd command. If you need to move up a level, use cd .. If your folder name contains spaces, surround it with quotations.
3. Type the command dir /b>filelist.txt
4. This will create the text file inside that folder. If you want the file output elsewhere, use a fully qualified name. Remember that Windows uses \ as the directory delimiter, not /
The “pretty” alternative: Simply drag and drop the folder into a Mozilla (Firefox) browser. The directory structure will be output in a pretty HTML document.