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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using MS DOS to view folder contents 2

Status
Not open for further replies.

s0ccerdude

Technical User
Jul 2, 2003
38
US
I want to create a delimited document listing each file in a specific folder. I've tried using different variations of the "dir" command in the dos command prompt, but I have not been able to succeed at this task.

If it helps, the directory to the folder that contains the documents is c:\src\93GA\hrc93\hrc93rtf

I've tried using this command:
dir> c:\src\93GA\hrc93\hrc93rtf\dir.doc

to create a file containing the folder contents, but the file that is created contains all of those folders and files in the c: directory.

Can anyone provide an easy answer? Please note: I'm very new to dos...
 
Here are a few jumbled thoughts and links you may find useful.


Right-click anywhere on the body of the DOS Screen and select "Mark" from the resulting menu and use the Mouse to highlight area

of screen that interests you. If you want all the screen use "Select All" instead of "Mark.

Right-click with mouse and this will automatically copy highlighted area to Clipboard (there will be no dialogue).

Paste clipboard contents into Notepad.

Print from Notepad.



Export file information from explore
thread779-648188

is there a utility to output a folder structure and its contents in XP
thread779-766888

Print to file a list of all the folders and files on a drive...
thread779-471712


rjhExtensions v1.3: (rjhSoftware)
is a simple utility that will add six functions to the context (right click) menu of Windows Explorer:



Re: Printing Contents of a Folder
From Berton Immenschuh

"Sure it's possible. Go to Start, Accessories, Command prompt. Change to the folder you want and type dir/o>prn.
This will organize the names alphabetically and the > re-directs the output from the screen to the printer.
Caveat, only works with printers attached to the computer, not network printers.

Or save it to a file: dir/o>folder.txt, puts it in a text file in the same folder and you can open it with Notepad, Word, WordPerfect, etc.

If you want the sub-folders included, add the /s switch."
 
Have you tried:

dir c:\src\93GA\hrc93\hrc93rtf > c:\src\93GA\hrc93\hrc93rtf\dir.doc

I think that command may return the results you are looking for.
 
You could always download a 3rd-party program off download.com. Do a search for "print folder" or "print dir" there's a few there. And if you really want to, I suppose you could run it through DOS :)
 
Thanks rmiley and bcastner. I did as bcastner advised and downloaded Karen's freeware at It works great and saves me the work of entering dos commands in the command prompt! However, I tried you code rmiley and it worked as well, so thanks for both of your help...
 
For those not familiar with Karen, she writes some of the cleanest and clearest user interfaces for Windows I have ever seen. The links above will give you access to the several utilities she offers as freeware.

Karen is on of the Windows Shell "greats", along with several other of my favorities:

Jim Eshelman's site: The remarkable Kelly Theriot: Doug Knox is just fantastic: And I am very fond of Daniel Petri's advice:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top