Sunday, September 23, 2012

Printing Directory Structure in Windows

I had been wondering how can I get a complete stock of the directories as well as contents on my system. In this endeavor Google came to my rescue and directed me to a post where I could find a DOS command to print the directory structure in Windows environment.

For Example:

If you need to know the contents of the C drive, then go to the command prompt and type 
"dir C:\ /s >output.txt"

where:

  • dir -  the dos command for displaying the directories
  • C:\ - the location of which you want the directory structure
  • /s - the dos command extension for displaying not only the directories but the files as well
  • >output.txt - refers to the name of output file (in this case output.txt) which will be placed at the root of the folder where the command is getting executed. In case you want the output to your specified location, then include the complete path of the destination after ">".





Source: http://superuser.com/questions/258287/what-is-a-good-tool-to-export-a-directory-structure