Apr 14

Have you ever needed a printout of files in a folder or list of your folders when using Windows Explorer? At times it is handy to have a list of the files that are in a directory. If you have tired to get a list of file names in a folder, you know that Windows does not have a way to do this task.

There are several ways to print a file and/or folder list. One method requires a little bit of code writing (no fear, it is very simple), and the other is a free program that makes printing the lists very easy.

First, for those who are a little more adventurous, you can simply add a few lines of code into a .bat file.

Start Windows Explorer. To do so, click Start, point to All Programs, point to Accessories, and then click Windows Explorer.

On the Tools menu in Windows Explorer, click Folder Options.

Click the View tab.

Under Hidden files and folders, click Show hidden files and folders.

Now, click the Folders icon on the tool bar.

Open Notepad. Click Start, then Programs and then Accessories.

Select Notepad. This opens Notepad.

Cope and paste the following code into Notepad:

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

On the File menu in Notepad, click Save As.

Save the file in at c:\Documents and Settings\<User>\SendTo.

You can save the file in your profile, All users, or any other profile you wish.

Before saving the file, you must name the file with a .bat extension.

In the File name box, type “Listing.bat”. You must include the “” to ensure the .bat extension is saved. You can also give this file any name you choose, just remember to use the .bat extension.

Close Notepad.

Thats it!

How to use the code.

Go back to Windows Explorer and highlight (click once on the folder) the folder in which you need the file list.

Right click the folder you want and select Sent To and point to the file that you created earlier (mine is Listing.bat).

The code will execute and open Notepad with the file list. You can print this list or save it.

Click on the thumbnail below to see an example of the output.

File List