If you are talking about generating a text file of the list of directories
and files on your, say, c: drive the following DOS command will create a
plain text file (openable in Excel) on the root of c: called listing.txt
containing a full listing:
dir c:\*.* /s/o/b > c:\listing.txt
If you want to try outputting to the screen first (to see what you'll get)
just miss off the " > c:\listing.txt". As it'll scroll on for pages,
putting " | more" instead will cause it to pause between pages (press space
to continue).
If you only want the contents of a particular folder listing, change
"c:\*.*" to "c:\documents\*.*".
If you want to change the name or location of the output text file, change
"c:\listing.txt".
If you already have a command which is creating the view you want in DOS
(as Paul suggests), simply appending " > c:\listing.txt" will create a text
file of the output (rather than sending it to the screen) which you can
then open in Excel.
Let me know how you get on with this.
Rgds,
Richard
At 11:26 16/12/2005, you wrote:
>I can remember using ms-dos to copy my file plan structure into excel.
>Sadly I cannot remember how to do it. I can get to see the structure in
>dos but cannot remember the syntax to be able to replicate the structure
>into excel. I think I used the | on the keyboard, but alas my frail memory
>fails me can anyone help please?
|