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

Printing contents of C:¦ 2

Status
Not open for further replies.

lamaar

Technical User
Jun 29, 2000
392
GB
Can someone let me know if it is possible to print the contents of say the c:\ drive in the same view of explorer. (without doing a print screen) Lamaar75@hotmail.com
 
Don't think you can do that without doing print screen.

You could always boot into DOS mode and print c: from there, but only if you can print in DOS mode.

Not too sure how it would turn out either, or if you can use a print command when in c:\ prompt, but you could try.
[deejay]
Nate
"If you're not living on the edge, you're taking up too much space!"
 
Not in Windows, although there are 3rd party tools that will do it. It can be done in DOS by redirecting the output of the dir command either directly to the printer or better to a text file which you can then edit and print.
Commands are
C:
cdthen
dir /s >lpt1 (direct to printer)
or
dir /s >dir.txt (will create file dir.txt in the root directory with the directry listing)
 
Thanks guys for the info, I did try in DOS but as my printer was not on LPT1 so gave up.

Lamaar Lamaar75@hotmail.com
 
As Mulga suggested, copy the directory to a text file then use notepad to open and print it.

You can create a BAT file if you (for some reason) need to dump it periodicaly. Below is a modification to Mulga's statements...

C:
cddir /s >dir.txt
[red]start notepad.exe /p dir.txt
exit[/red]


That should do it. --MiggyD

Never be afraid to try something new. Remember that amateurs built the Ark. Professionals built the Titanic.
 
lamaar

Here is an elegant tweak from another site.
courtesy of POBrien....
------------------------------------------------------------
Printing Directory listings...

Ever wanted to print the contents of a folder and its subfolders in Explorer? Can't do it, can you? Well, with a simple tweak to the Registry, you can.

Open Notepad and type DIR /S >LPT1, where LPT1 is the printer port. Save the file as PRN-LIST.BAT in the Windows 95 (or WinNT) folder and close Notepad. For those using Win 95, now you have to open Explorer, right-click on the file you just created, and choose Properties. Then on the Program tab, choose Minimized from the Run list, select the Close on exit option, and click on OK.

Next (for both Windows 95 and NT users), start the Registry Editor and navigate to HKEY_CLASSES_ROOT\Directory\. Right-click on the \shell folder, choose New|Key, and name it Print List. Right-click on the Print List folder, select New|Key, and name it Command. In the right-hand window, right-click on (Default) and select Modify. Then in the Edit String dialog, type C:\Windows\PRN-LIST.BAT in the Value data field and click on OK. To print a folder's contents, right-click on the folder and select Print List from the pop-up menu.
------------------------------------------------------------ smitee
 
You could also use a the parameter %1 in your batch file.
dir /s %1 > c:\dir.txt
start notepad.exe c:\dir.txt
exit
Place the batch file in C:\Windows as the path to directory is already set.
Then from Start>Run you could enter:
prtdir c:\temp

This would send the dir C:\temp to a text file and load to notepad.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top