We help IT Professionals succeed at work.

PRINT A LIST OF FILES IN ANY FOLDER

wfmitchell
wfmitchell asked
on
Kim Kommando the Digital Goddess offers up this routine in her latest newsletter for printing files in a folder from Windows Explorer. It does not work however. I'll bet the real experts have the answer.

PRINT A LIST OF FILES IN ANY FOLDER                    
You can print a list of the files in any folder within                    
Windows Explorer with this little trick.                    
1. Open Notepad                    
2. Type "%1 > lpt1:" (without the quotes) and press Enter.              
3. Type "cls" (without the quotes) on the second line (make sure there's nothing after cls).    
4. Save this two-line file as "printdir.bat" in your C:\Windows\SendTo folder.                    
Now, when you want to print a file listing in Explorer,              
right-click the folder and select Sent To, printdir.bat.          

JANUARY 15 - I CAN NO LONGER ADD A RESPONSE. ALL I CAN DO IS EDIT THE QUESTION. THE SYSTEM MUST BE BROKEN.
Comment
Watch Question

Commented:
line 2 should read

DIR %1 > LPT1

and you would need to run it with a path to take a directory of, such as

PRINTDIR C:\

Commented:
or you can use an app and have many more options.
A freebee and a shareware.


http://www.zdnet.com/pcmag/pctech/content/solutions/oe1814d.htm

http://www.segobit.com/adp.htm

Hi slink9.

Commented:
There we go with that mind reading thing again.  I usually forget to think "Is this what the person really wants or would they like something else better."  I guess that ability comes with help desk experience.  You have to read between the lines to get to the problem.

By the way, when will the hall of fame be working again?

Commented:
Hi slink9  :)
>>>>>>>>help desk experience

Not me. I would go out of my mind if I did that for a living!

What the heck is the hall of fame?
Oh that!
You got that many points? Congratulations!
I'll have to check your profile.
Cheers
You might want to try Karen Kenworthy's (free) Directory Printer:

http://www.karenware.com/powertools/ptdirprn.html

Ron
gonzal13Retired

Commented:
Go to folder, open it up click on the first line, go to the last click CTRL C, open MS Word, and paste using CTRL V.

Commented:
Or along with slinks and centerv's excellent suggestions here is something that may interest you as well. It is an Explorer repalcement of sorts but it has lot of built in utilities and one of them is the ability to print file and folder lists. they have a free version but I don't know if it prints file and folder lists.

http://www.ontrack.com/special/pc4proquad.asp
PowerDesk 4 Pro
PowerDesk 4 Pro has all the great features and functionality in PowerDesk 4, plus integrated FTP, a customizable toolbar for fast access to your favorite files and applications, extensive file viewing capabilities for over 200 types of files, a tool that helps you convert graphic files from one format to another, a Size Manager that shows you which files are cluttering up your drive, 90-days of free technical support and much more!



The Crazy One

Commented:
There is a whole bunch of utils out there which will do what you want.  It is just a matter of deciding which method you want.
As far as rewards go, I enjoyed "working" for the t-shirts, but I never got the last one (the 100,000 point level).  Since I could no longer get them, I made it a point to work on improving my HOF ranking.  I was moving up in the ranks pretty well when it stopped working.  I am up to 800 questions and 276k, but am stuck with about half of that in the HOF.

Author

Commented:
re: Slink9's first suggestion

the program now reads

%1 > lpt1:
DIR %1 > LPT1
cls

the printer loads but i need a command to end the page and spit it out, if i do it several times it finally fills the page and prints out.

also, i don't know how to implement your comment about needing a path. i embedded
PRINTDIR C:\  at the end of the program but it caused an error.

Commented:
The program should read

DIR %1 > LPT1
cls

If you want to print a directory of the root you would use C:\.  For a printed listing of program files you would use
PRINTDIR "C:\Program Files"
The quotes around the path are necessary so it will recognize long file names.  Without using quotes you will need to use the DOS short file name, which is probably progra~1

Author

Commented:
where do you put the command - PRINTDIR "C:\Program Files"  ????   i did not think autoexec.bat was valid after w95.

Author

Commented:
i just tried it and it does print out but the files are in random order, not in the order they appear on the screen.
Top Expert 2004

Commented:
this is how I do it
rom dos
dir  /s >test.txt
then print the test.txt
where test.txt is the name of the text file you wish to make
or from windows get
Directory Printer v2.10
http://www.winmag.com/columns/powertools/ptdirprn.htm

Commented:
slink9
Too bad about the T.
I sense the site is making a comeback and maybe the Ts as well.
Good luck.

Commented:
It seems that the site is coming back.  The implications a few months ago is that the site was definitely going away, it was just a matter of time.  Now I believe the overall sentiment is that the site is going to come back as good as before.  Once again, it's just a matter of time.
Here's the one I use:

Dir %1 > lpt1:
cls

Follow the original instructions you received from the Digital Goddess using the two lines I've given above.  Works like a charm...
Commented:
2. Type "%1 > lpt1:" (without the quotes) and press Enter.

The results of the above line will not be a directory listing.  As a matter of fact, it won't run at all since %1 is accepted as the command.  I guess following the original instructions won't work!!

Author

Commented:
I wrote to Kim Kommando's flunky and have gotten no response. I suspect the Digital Goddess is 95% Marketing BS and 5% technical knowledge.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.