Printing a Directory

Sunday, December 6, 2009
WindowsXP does not allow you to use previously describe methods for printing the contents of a directory.
To do this requires the creation of a small batch file which is then added to your right-click options.
Batch File

On the root of the C: drive, create a batch file called print_directory.bat with the following lines:
@echo off
dir %1 /o:g > c:\directory.txt
start /w notepad /p c:\directory.txt
del c:\directory.txt
exit
Note: dir %1 /o:g will print with any directories listed first. You can add whatever other switches you like
Adding to the Explorer Right Click

1.Start the Explorer
2.Go to Tools / Folder Options
3.On the File Types tab, click File Folder.
4.Click Advanced button and then click New.
5.In the Action box, type Print Directory (or whatever text you want to appear).
6.In the Application used to perform action box, type C:\print_directory.bat, and then click OK.
7.Click OK, click OK, and then click Close

0 comments:

Post a Comment

Related Posts with Thumbnails