Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Print Directory

Feb 29, 2004 7:58AM PST

Hi,
Just wanted to printout directories of my cd's to just make a small listing of what's on the cd and dvd's.

How do I printout a copy of a directory when I use my Command Prompt Window? Or maybe you know of a better way to do this?

I am using XP Pro

Thanks,
Rocky

Discussion is locked

- Collapse -
Re:Print Directory/ try this
Feb 29, 2004 8:16AM PST

I know you can create a text file of the the directory and sub-directories within the one you type this command

"dir /s > print" (without quotes). It will create the text file with a complete file listing under it. Of course, it will not be able to create this on a CD. Try the command but redirect it to a folder of your choice. Good luck.

- Collapse -
Re:Re:Print Directory/ try this/an addendum
Feb 29, 2004 8:21AM PST

If you have a printer on LPT1, I believe you can use the command "dir /s > lpt1". My printers are of network type so I cannot simulate this to test it first but remember something like this from old DOS but could have my syntax incorrect. Someone out there will remember.

- Collapse -
Re:Print Directory
Feb 29, 2004 8:26AM PST

You can add Print Directory as an option in Windows Explorer using the following method:

Open Notepad, and then copy and paste the following text into Notepad:
@echo off
dir %1 /-p /o:gn > "%temp%\Listing"
start /w notepad /p "%temp%\Listing"
del "%temp%\Listing"
exit

* Save the file as Prin.bat in the Windows directory, and then close Notepad.
* Start Windows Explorer, click Tools, and then click Folder Options.
* Click the File Types tab, and then click File Folder.
* Click Edit, and then click New.
* In the Action box, type Print Directory Listing.
* In Application used to perform action, click Prin.bat, and then click OK.
* Click OK, click Apply, and then click OK.
* Open Windows Explorer, right-click the folder that you would like to print a directory listing of, and then click Print Directory Listing.