Generate a File Listing from a Windows Explorer Context Menu
How to create a context menu item that when clicked will generate an
editable text file listing of the selected directory.
To create the entry in the context menu it's necessary to first create a
..bat file. The format for the .bat file is:
dir /a /-p /o:gen >filelisting.txt
The name of the .txt file can be whatever you'd like it called. In the
example above it's filelisting.
Create the file in Notepad and save the file in your Windows folder. Make
sure that the file extension is .bat (if necessary rename the file and
change the extension from .txt to bat).
Once the .bat file has been created the next step is to make it functional
and easily accessible by integrating it into the context menu that opens
when a right click is executed.
To do this:
Open Windows Explorer, click Tools, then click Folder Options.
Click the File Types tab, and then click Folder.
Click the Advanced button and then click New.
In the Action box, type the name that you want to appear in the context
menu. For example, Create File Listing.
Browse to the location where the .bat file you created is located, select it
and let it be the Application Used to Perform Actions.
Click OK, Apply and OK again to close all the open windows.
That's it !
To test, open up Windows Explorer, navigate to whatever folder you want to
use as the basis for the file list and right click to open the context menu.
Click on the Create File Listing item and the list will be generated and
displayed at the bottom of the open window as filelisting.txt. Since it is a
text file it can be fully edited, copied, pasted, printed, etc for any
purpose.
Note: If for any reason you want to remove the Create File Listing entry
from the context menu it will be necessary to edit the registry. This can be
accomplished by navigating to
HKEY_CLASSES_ROOT\Folder\shell\Create_File_Listing using regedit and
deleting the Create_File_Listing key in the left pane. Close regedit and
reboot to complete removal.