Save directory listing as file

G

Guest

Is there a way to save the list of contents (i.e., subdirecories and files)
as a file? Not the entire contents of the contents of the directory--just
the names (or names and details)? TIA. John P.
 
R

Ramesh, MS-MVP

For a normal directory list printing, see:
http://support.microsoft.com/?kbid=321379
http://www.karenware.com/powertools/ptdirprn.asp

Retrieving Extended File Properties - Scripting:
http://www.microsoft.com/resources/...00/server/scriptguide/en-us/sas_fil_lunl.mspx

From David Candy:
http://groups.google.co.in/groups?selm=#[email protected]

From Torgeir:
http://groups.google.co.in/[email protected]

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Is there a way to save the list of contents (i.e., subdirecories and files)
as a file? Not the entire contents of the contents of the directory--just
the names (or names and details)? TIA. John P.
 
G

Guest

Thanks for the advice and help.

Some of the suggestions only sent the list directly to a printer, not to a
file.
Some required scripting, which is (1) over my head and (2) supposedly turned
off on my computer.
Most revealed (to me) valuable sources of information.

Some of those sources, plus some searching, plus re-igniting some long-lost
memories, plus a fair bit of trial and error, led me to this relatively
simple solution:

In Windows, click start, then run, type in "cmd" (no quotes), and hit enter.
Then, use the old DOS dir command with a redirect. Simple example:
dir c:\ > c:\C-DirectoryListing.txt

When you've confirmed your output.txt (or whatever name you gave it) file,
type exit to get out of command mode.

The DOS dir command does have some restrictions and limitations, but it is
modifiable in terms of number and types of folders\files to check,
attributes, sort order, and time field, and wild cards can be used.

I found this (and more) information at
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/dir.mspx?mfr=true

Thanks again to all for your information and guidance.

JP

~~~~~~~~~~~~~~
 
B

BillyG

The easiest way is to:

open a cmd window (Start - Run - cmd - press the OK button)

navigate to the folder you want to grab the names of
(unless you know how to supply the path to it)

type: dir /s > test.txt (or whatever you want to call it... you can
also save it in any other folder you want of course)

you can also see a graphical "tree' of any directory and it's sub-dirs
by typing TREE at the prompt

any command can give help by typing the command then a space then /?,
as in dir /?

finally, for a listing of all applicable commands for the current OS
you are using, type HELP

G/L
 
B

BillyG

I forgot, to view the file you just created, type

TYPE filename.ext (as in test.txt)
 
G

Guest

Here's how I get a printing of my directory contents:

I use Directory Printer 2.2 by Glenn Alcott E-mail:
(e-mail address removed) . I've had it a long time. I can print a
listing of the contents of a folder, include subfolders or not; I can
see it on screen, send it straight to the printer, or save it as text.

It's a handy little program. Perhaps you might still find it if you
google for it?

~~~~~~~~~~~
Awaiting your responses with baited breath, I remain, yours truly,
<*(((>< ~~~
~~~~~~~~~~~
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top