Infesting you with Virus News
 

Tips

Generating a File Listing from a Windows Explorer Context Menu

1) Step : Creating A Batch File

If you want to create the entry in the context menu 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 may be whatever you'd like it called. In the example above it's filelisting, but it could just as easily be filelist, listoffiles, namedfiles, or even wally. In case you've chosen the name, then create the file in Notepad. Then save the file in your Windows folder as stated below. If you wish, just copy and paste the example up above.


Fig. 01

2) Step: Modifying The Context Menu

Having the .bat file created then you have to make it functional and easily accessible by integrating it into the context menu which opens when a right click is executed. To do this:

  • Open Windows Explorer. Click Tools. Then click Folder Options.
  • Click the File Types tab. Then click Folder.
  • Click the Advanced button. Then click New to pen the New Action box that is presented below.


Fig. 02

Type the name you wish to appear in the context menu in the New Action [Fig. 02] box. You have a wide latitude in choices however, something akin to Create File Listing is going to be probably more useful than naming it Martha Stewart. The example that is above indicates, that I ditched Martha in favor of Create File Listing. So browse to the location where the .bat file which you created is located. Then select it and let it be the Application Used to Perform Actions. Finally, click OK and do the standard Windows dance of Apply then OK again in order to close all the windows that are opened.

So congratulations! A new item is created on the context menu that's ready for work. Now open up Windows Explorer as it is done in the example [Fig. 03] below.


Fig. 03

You may navigate to whatever folder you wish to use as the basis for the file list and right click in order to open the context menu. Then click on the Create File Listing item and the list is going to be generated and displayed at the bottom of the open window as filelisting.txt. The example which is below was created from the Sample Music folder presented above. Being a text file it may be fully edited, copied, pasted, printed, etc for any purpose.


Fig. 04

Note: So if for any reason you wish to remove the Create File Listing entry from the context menu you have to edit the registry. This can be fulfilled by navigating to HKEY_CLASSES_ROOT\Folder\shell\Create_File_Listing using regedit and deleting the Create_File_Listing key in the left pane. Then close regedit and reboot in order removal to be completed.


Additional File Modifications Submitted by TEG Readers



If you create the batch file for the first time you have just to modify the file that is listed in the article. So it looks;

dir /a /b /-p /o:gen >filelisting.txt

Also you have to continue with the instructions if you wish the modification to be finished. In case the batch file already exists in C:\Windows then navigate to the file. Right click it and choose Edit from the context menu. is going to modify the output and it appears as indicated below.


Fig. 05

Being easy enough to go into the C:\Windows directory and edit the batch file in order to generate the type of output preferred, that depends on how often you change between the two output formats you can find it more convenient to create separate entries for each format that may be chosen from the context menu. Follow the procedure.

  • Create one batch file using the /b switch. Name it filelisting.bat.

  • Create a second batch file without the /b switch. Then name it filelisting1.bat.

  • Save both files in C:\Windows.

  • Change the context menu as Step 2 and Fig. 02 show above. However, this time work through the procedure twice giving each entry a different name in the Action line, altogether assigning each entry a different batch file. The two names were used "Create File Listing" and "Create File Listing Verbose" for this example, assigning the batch file with the /b switch to "Create File Listing" and the batch file without the /b switch to the "Create File Listing Verbose" entry.

  • Both entries are now on the context menu and accessible for use Fig. 06. shows.


Fig. 06

 


 


User Comments

Jrex Xerj August 6, 2009
You can use this too with the above procedure. Just replace the text (dir /a /-p /o:gen >filelisting.txt) in your .bat file with the text below. The good thing with this is you will be able to list the root and sub-folders.

tree /f>FileList.txt

You can also use the below option to automatically delete the generated file after reading it.

tree /f>FileList.txt
FileList.txt
del FileList.txt
wList - create file list May 14, 2009
Here is link again.
T.
Tankseruba May 14, 2009
Great, good to know ho to do this manually.
For those who want it automatically I recommend wList

http://sharktime.com/us_wList.html

easy and handy software for creating file lists.
T.
Name:
Email:
Website:
Comment:
Please type 5-digit security code below:
Captcha image for spam protection

Latest Comments

February 8, 2010
Brian xavier- what is the support option you speak of? I just got it yesterday 2/12 since you had it... more..
February 8, 2010
Zlob is one of the most common types of trojan programs used to attack windows these days. In a typical... more..
February 8, 2010
I have "your pc protector" invading my laptop. I have downloaded several attempted fixes to... more..
more comments..
rss
Home > Tips > Tweaks > Software > Windows Explorer > Generating a File Listing from a Windows Explorer Context Menu