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

Printing a list of files 1

Status
Not open for further replies.

pcullen

IS-IT--Management
Dec 3, 2001
19
0
0
IE
Hi,
I wish to print a list of contents of a folder
e.g A printout of the names of all the files in MyDocuments

Thanks
 
Start Notepad. Copy and paste the following:

@echo off
dir %1 /-p /o:gn > "%temp%\Listing"
start /w notepad /p "%temp%\Listing"
del "%temp%\Listing"
exit


Save the file as [color#880000]Print.bat[/color] in the Windows directory (or WINNT).

Under Windows Explorer, go to Tools, Folder Options, File Types tab, and choose File Folder. (you have to scroll down to N/A)
Click Advanced, and then New.

In the Action box, type Directory Listing.
In the Application used to perform action box, type Print.bat, click OK. Click OK, OK, Close.

In Windows Explorer, right-click the folder that you would like to print a directory listing of, and then click Directory Listing.

 
Check out this thread(thread615-206821)

It shows how to get the same results as the print out using xlhelp's (star deserving) post but as a text file.

or change the second line of code to:
start /w notepad "%temp%\Listing"
to see the listing in notepad. Mike

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top