Deepfolders - Quick Folder Lists for Windows XP
Let's feel pro and use the > (pipe) command.
Feb 2006
I ripped my classical music CDs onto the hard drive, so I can listen to it with my Creative mp3 player. I wanted to print a list of the music in Word, but typing all the album titles one-by-one was too slow. Here's the quick and easy way to generate a list of my music for the catalogue or for the backup-DVD cover.
How To Do It
Get to the command line interface: Start Menu\Run...\Open:, type in cmd and hit OK.
Alternative: in Total Commander, click Commands\Run DOS.

Total Commander's Run DOS opens a command line window in the current folder.
Here we create a list with the dir command and redirect the output into a text file with the > (pipe) command.
I use four different listings, either folders only or folders and files, and with or without subfolders. Here you are the different commands for each:
Then you can see the result with notepad (simply type notepad folders.txt and hit Enter). I like the best the first option, usually I make a quick list of my music collection this way for later edit, which is sorted into folders in the [artist - album title] format.
You can also copy-paste the commands from here, just use right click/Paste in the command line window.

dir redirected with > into a text file.
I got something like this as a result:

The generated list using dir /a:d /b > folders.txt.
Tips
All the options of dir
To customize the results of dir, I used switches, which are described in help. Access it with dir /?.

dir command help screen
Set up batch files
Because I use very often these listings, I created small batch files and assigned them as commands to the Start Menu in Total Commander. Now, if I want to create a quick list of some folders on my hard drive, I just navigate there in TC and hit Start/folders.txt.

Easy edit in Word
To edit deepfoldersandfiles.txt in Word, I simply copy-paste the text from Notepad and switch to Web Layout view (View\Web Layout), because there are no line brakes that way.
To delete the leading C:\bla-bla-bla\ from the file structure, I select text holding down the Alt key. This way, I can select along a vertical line.

Word edit of deepfilesandfolders.txt - Web Layout and vertical select with Alt.
'Open Command Window Here' Powert-Toy
There is a small add-on for Windows XP, which enables you to open a command window in the given directory from the context menu in Windows Explorer. Similar to 'Run DOS' in Total Commander. Download from here.
Last edited on 07-Jan-2007.
(c) Imre Oliver Kozak and @Foxpop.