Add an option to print a list of a folder's files to Windows Explorer
If you want to be able to print a list of the files in a particular folder, you can do so by creating a short batch file and then associating it with file folders. To do so, begin by creating the following batch file in Notepad:
dir %1 /-p /o:gn > "%temp%\filelist"
start /w notepad /p "%temp%\filelist"
Save this batch file as dir.bat and place it in the Windows folder. Next, start Windows Explorer. Choose Tools | Folder Options to open the Folder Options dialog box. Select the File Types tab. In the list of file types, scroll down and select the File Folder file type. (This file type will have "N/A" for its
extension.) Click Advanced, and then click New.
In the Action text box, type Print Folder Listing. In the Application Used To Perform Action text box, type dir.bat and click OK. Click OK, and then click Close to close the Folder Options dialog box. To print a list of a folder's contents, right-click on the folder and choose Print Folder Listing.