Saturday, January 19, 2008

Print or Create List of File Names

Want to create a list of files in a folder, or print them out?
Create a "bat" file:

Now, here's how to create the "bat" file.
Open Notepad.
Type in the following lines exactly like I have them. (or copy/paste)

To create a list .txt file, copy this line:

dir %1 > C:\list.txt: cls

and save as: textdir.bat
*Note*
You can edit the line above to save to any other folder you wish. I created a "C:\Temp" folder for all my temporary files, so my "bat" file is:
dir %1 > C:\Temp\list.txt: cls

To create a print list, copy this line:

dir %1 > lpt1: cls

and save as: printdir.bat

Put these two files in "C:\Documents and Settings\\SendTo" folder, that way you can just right click on the folder, and choose "SendTo", and then choose either the printdir.bat or textdir.txt.

* Note*
The "SendTo" folder is hidden by default. To view it, simply open "Windows Explorer", and click on "Tools" and choose "Folder Options".
Click on "View" tab, and scroll down under the "Hidden files and folders" line.
Click on "Show hidden files and folders", and then click "OK" at the bottom.

No comments: