I had user request that he regularly wanted to produce a list of all files in a particular folder. This How-To is based on the following Microsoft KB Article
http://support.microsoft.com/kb/321379
In essence it adds a menu to the right click menu, so you right click on a folder in explorer and click Print Directory Listing and either Prints it straight to a printer(standard functionality) or Opens it in Notepad(My functionality), you can then import it into Excel.
While the original functionality is good, it isn’t ideal. The original will print the directory listing with modified dates, files size and some other info, straight to your default printer.
The right click option seen in the screenshot at the top of this post runs a script in:
C:WindowsPrintdir.bat
%windir%/Printdir.bat
Opening the script in Notepad, I changed it to show me just file names and paste it into notepad.
I change the script to:
@echo off
dir %1 /-p /-b /o:gn > "%temp%Listing"
start /w notepad "%temp%Listing"
del "%temp%Listing"
exit
You can now right click on any folder and choose Print Directory Listing(Wording can be changed by following http://www.makeuseof.com/tag/how-to-add-remove-entries-from-the-right-click-menu/) This will then open Notepad and display a list of all the folders and files.
muy bueno
The above bat file works, unfortunately on my system the listing flashes on the screen for 0.2 seconds then disappears.
I changed it to
@echo off
dir %1 /-p /-b /o:gn > “%temp%Listing”
start /w notepad “%temp%Listing”
wait
and now it waits until I close notepad.