General discussion

How to print a directory (folder)?

Mar 27, 2005 4:40AM PST

I was hoping someone could explain to me how to print the contents of a folder? I've tried copying and pasting into Word. That didn't work. I'm runnning Windows ME. Any suggestions? Thanks

Discussion is locked

Follow
Reply to: How to print a directory (folder)?
PLEASE NOTE: Do not post advertisements, offensive materials, profanity, or personal attacks. Please remember to be considerate of other members. If you are new to the CNET Forums, please read our CNET Forums FAQ. All submitted content is subject to our Terms of Use.
Reporting: How to print a directory (folder)?
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Comments
- Collapse -
A few options
Mar 27, 2005 5:23AM PST

How do you print a directory of what's contained on a disk?
Two ways to do this........

Answer:
Go to your DOS prompt and type this command (this will print your directory in alphabetical order). This example is for your "a" drive or floppy drive but it should work for all your drives including a zip drive--just change the letter of your drive in your command line:

Dir a:\ /o:n>prn

Then click your Enter key

******************

Bill Gaston's Answer:
Cut and paste the next two lines from this message into NotePad or any text editor and be sure to save it with a .bat extension in any location you want:

dir %1 /-p /a /o > "%temp%\File List"
notepad /p "%temp%\File List"

Note: You may leave the /p off in the second line and use the internal print option from Notepad if desired.

Right-click the name of this file and create a shortcut in the same folder. On the Program tab of this shortcut, check the Close on Exit.

Right-click on the shortcut and select copy. Move to the "Send To" folder and right-click a blank space and select "Paste Shortcut".

From now on, left-click a folder, right-click and select "Send To" and this shortcut for printing a list.

Notes and caveats:

The batch file writes a file to the Temp folder named "File List."

A list can be sent to a printer or to a file. This depends on the printer selected before selecting the shortcut. To create a Text Printer, go to Control Panel > Add Printers > Generic > Generic/Text Only > default to Print To File. Select this printer before starting the procedure if you want a file list saved. If you should desire to save a file list besides printing one, enter the storage location for this file list in the shortcut. Enter the drive and folder name where you would like this list to reside on the "Working" line of the shortcut - I use the "Temp" folder (the %temp%) and file name "File list" (the last line of the batch).

This procedure may be set up so the shortcut is listed on the Start button's right-click menu, besides the "Send To" folder, in addition to, or both. In Explorer, click on View > Options > File Types. Click once on "File Folder" > Edit > New and for "Action," type Print File Listing; for "Application," browse for your shortcut created above.
Caveat: Since the printing procedure is added to the Start | right-click menu at all times, it only functions when clicking a folder name in Explorer and selecting "Print File Listing".

If you want to do the same thing for a drive's root, use "Drive" file types instead of "File Folder". You must include the /s parameter in your created batch file for printing all sub-folders as part of the listing. You may want to create another batch file by a different name when including /s, however, I include it anyway.
Caveats: There is no means of including hidden sub-folders to print, such as printing the Windows 95 folder and all sub-folders - the parameters for the "DIR" command does not include this feature. In order to get a file listing of a hidden sub-folder, the single folder itself must be printed. Examples of two folders in Windows are the INF and Fonts folder.

If NotePad cannot handle a large job, Windows will suggest using WordPad instead.

ALSO:


"rjhExtensions v1.3"
Copyright

- Collapse -
Printing a Directory
Mar 27, 2005 10:39PM PST

CNET Forums

Forum Info