O T - Help Needed From You Knowledgable Folk

I know that this is not strictly DIY, more a computer group thread but I never seem to get any joy from those groups.

Basic problem. I wish print to a file for editing in Word a list of a folder contents.

I can do this using the DOS cmd prompt and then using dos commands to get to the folder and then "print > file.txt" then open Word and Open, do a search and then click ok.

Is there an easier way to do this. ?

Using Alt - PrnScreen only gives you an image of the screen.

Jim

Reply to
the_constructor
Loading thread data ...

Depends what you think is "hard" about the way you're already doing it?

But this should let you send your directory listing direct to the clipboard

formatting link
DIR /B C:\whatever | PIPE

then you can fire up word or notepad and paste the results in.

AnOther way could be to write a Word macro using the FileSystemObject COM object to read the folder contents and insert them direct to the word document.

Reply to
Andy Burns

Grrr, bloody fingers with a mind of their own ... make that

DIR /B C:\whatever | CLIP

Reply to
Andy Burns

There's also a windows program called LS that builds a file listing the contents of a hdd.

NT

Reply to
NT

Try:-

formatting link

Reply to
Howard Neil

The sign > redirects the output of any command. As an example. To create a text file as you describe in a file called dirlist.txt in the root of C: drive containing the listing of folder C:\TestFolder open a command prompt and use: dir c:\testfolder > c:\dirlist.txt

Reply to
Tinkerer

Reply to
Robin

I use Terminal, get into the directory and do ls -la. I have a Word doc window open.

I then select all the interesting text in the directory listing, pick it up with the mouse and drag-n-drop it into the Word window. Done.

Easy.

Reply to
Tim Streater

is 'ls' a normal windows command?

I would have thought you could cut and paste from a 'finder' window..

Reply to
The Natural Philosopher

C> dir/b > list.txt

Then read list.txt into Word.

Reply to
Bob Eager

You can do Select All and then copy and paste from a Finder window to a Word one. What you get is a list of files with no other info (such as sizes) but re-reading the OP perhaps that suffices.

Reply to
Tim Streater

LS is not a standard command that I am aware of up to Vista anyway... (you will get it if you install cygwin along with all the other usual

*nix style commands)

dir > file.txt

is pretty straight forward...

Reply to
John Rumm

:

thats why I said program, not command

Unless things have radically changed from when I last used DOS, that doesnt list the contents of every directory on the entire disc in one go.

NT

Reply to
NT

it exists as an alias if you use powershell ... but the O/P asked for simpler ...

I thought that was what the O/P was doing already?

Reply to
Andy Burns

te:

I see modern windows does have that option. Never encountered it in win98.

NT

Reply to
NT

Was that what was requested? If so

DIR /S /B > file.txt

But having checked the original post, only one folder's worth of listing is required.

Reply to
Andy Burns

Ctrl-Alt PrnScreen will give just the window in focus to the clipboard. Paste into paint or your program of choice and print from there.

Reply to
<me9

Fine if the list actually fits the window, otherwise very tedious.

Reply to
Bob Eager

and it doesn't help the OP who wants a text file for editing

Reply to
chris French

Did he ask for that? In which case:

dir /s > file.txt

or for DOS 3.3 era and older:

chkdsk /v > file.txt

Reply to
John Rumm

HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.