Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save Directory as Text

Status
Not open for further replies.

RWB42

Technical User
May 12, 2002
20
US
I need to record directory structures to a text file. I can't find out how to do this anywhere! I was told that it can be done at the command prompt with various flags but i don't really have the time to find out what each tag does. If anyone can give me any information about how to output a directory's file name structre to a text file I would really appreciate it! Also, if anyone knows of a third party program that would give me the same results it would be just as helpful. Thank you in advance!!!!!
 
Easiest way for a directory list to text file is DOS command
"dir >textfilename.txt" but there are hundreds of flags that you haven't time to learn...try this:

"dir /s >textfilename.txt"

and you'll get a list of every file in that directory and any sub-directories.

Alex
 
Strange... I find that I can type dir /? and read the help listing to figure out most everything I would need to know in less time than it takes to post this message.

"dir /ad /s" is good for showing just the directories.
you could pipe it through find
(dir /ad /s | find "Directory" )
to give a rough idea of the directory structure.

I have no idea what you mean by a directory's file name structure.

The real question might be for what purpose. If just for documentation this is fine. But if you actually want to be able to do something with this later then other routes might prove more useful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top