Print out Directory structure?

TheCreator

2[H]4U
Joined
Jan 24, 2005
Messages
3,173
What do you guys use to print out a list of all folders/files on a file server?

We are going to be doing some rearranging while migrating our server and I'd like to use something to dump all the data either to a printer or excel or something...
 
1. Open a command prompt. (Start, run, cmd.exe)
2. Enter the drive letter you wish to list.
Code:
c:<enter>

3. If you're not at just a C:\ prompt, type in CD\ to get to the root of the drive.
Code:
cd\<enter>

4. List the directory and redirect it to a text file.
Code:
dir /s > c:\fileList.txt

When it's finished, the cursor will start blinking again. It will take a long time, especially if you have a LOT of files. Once it's done, open c:\fileList.txt (or whatever you called it) in notepad, word, excel, or whatever. You might not be able to use notepad because you'll probably have too bit of a file for it.
 
Thanks,

Is there a way to run that and only get the folders/subfolders and not list each individual file in every folder? The report would be much shorter that way.
 
yup, same command Demon10000 showed you, just add the "/ad" also. It should look something like this:

Code:
dir /ad /s > c:\folderlist.txt
 
Back
Top