List Folder Contents In A Word Document
The other day I stumbled across a very useful trick – useful for me anyways and hopefully a few others out there. I discovered that I could list the contents of a folder in a Word document using the Command Prompt.
First, open your folder in Windows Explorer. Highlight the name of the folder in the Address bar, right click and select Copy. Next, open the Command Prompt (which you can find on the Start menu).
At the Command Prompt, type CD ” (be sure to include a space between the letter D and the double quotes), right click, select Paste and press Enter.
The Command Prompt should display the name of your folder, such as "D:PicturesVacations>".
Now, at the Command Prompt, type the following command to generate the list of folder contents in a text file.
Summer DIR /ON /B *.* > D:folderlist.txt
The /ON switch means the list will be sorted by name.
The /B switch generates a list of the filenames without the size and date/time stamp.
The “greater than” sign redirects the output of the command into the file specified (in the example above, this would be C:folderlist.txt).
Now, open the text file in Word and you will have a list of files contained within the folder.





