Archive for the ‘file’ Category

Generate a File Listing from a Windows Explorer Context Menu

March 11, 2009

Recommended batch code:

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

fileListing.bat

How many times have you been browsing through directories in Windows Explorer and wished you could generate a text file or printout listing the files and folders? It seems like such a simple request that it’s amazing the option isn’t available. You don’t believe me? Right click on a folder and see for yourself if there is an option to list or print the structure. There isn’t, but there is a workaround that doesn’t require any third party software. Here’s how to create a context menu item that when clicked will generate an editable text file listing of the selected directory.

Step 1 – Create A Batch File

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, but it could just as easily be filelist, listoffiles, namedfiles, or even wally if you have a sense of the bizarre. Once you’ve decided on the name, create the file in Notepad and save the file in your Windows folder as shown below. If you want, just copy and paste the example up above if you don’t find wally intriguing.


Fig. 01

Step 2 – Modify The Context Menu

Now that we have the .bat file 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 to pen the New Action box shown below.


Fig. 02

In the New Action [Fig. 02] box, type the name that you want to appear in the context menu. Once again, you have a wide latitude in choices but something akin to Create File Listing will probably be more useful than naming it Martha Stewart. As you can see in the example above, I ditched Martha in favor of Create File Listing. Sorry Martha. 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 and do the standard Windows dance of Apply and OK again to close all the open windows.

That’s it ! Congratulations. You’ve created a new item on the context menu that’s ready to go to work. So now that’s it there, what can you do with it? Open up Windows Explorer as I did in the example [Fig. 03] below.


Fig. 03

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. The example below was created from the Sample Music folder shown above. Since it is a text file it can be fully edited, copied, pasted, printed, etc for any purpose.


Fig. 04

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.


Additional File Modifications Submitted by TEG Readers


The following tip was sent in containing a very useful modification to the batch file;

Adding the “/b” switch to the proposed batch file will create a “bare format (no heading information or summary)” text which makes the output much easier to copy and manipulate. It eliminates all the other garbage in the output file.
Best regards,

Geert Pauwels

This is an excellent idea and very easy to implement. If you are creating the batch file for the first time just modify the file listed in the article so it reads;

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

and continue with the instructions for completing the modification. If the batch file already exists in C:\Windows, navigate to the file, right click it and select Edit from the context menu and modify the file so it contains the /b switch. Save the changes and close the file. The change will modify the output so it appears as shown below.


Fig. 05

While it’s easy enough to go into the C:\Windows directory and edit the batch file to generate the type of output preferred, depending on how often you change between the two output formats you may find it more convenient to create separate entries for each format that can be selected from the context menu. The procedure is simple.

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

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

  • Save both files in C:\Windows.

  • Modify the context menu as shown in Step 2 and Fig. 02 above, but this time go through the procedure twice and give each entry a different name in the Action line, assigning each entry a different batch file. I used the names “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 available for use as shown in Fig. 06.


Fig. 06


The following modification was submitted by Antony

Hi,

Thanks for the tip on generating a directory listing from windows explorer – this has bugged me for ages.

Just wanted to add that when I run the command as listed, the file gets created in the directory that I want a listing for, but is never displayed automatically (I have to open it manually). This was annoying so I fixed it by doing the following:

  1. Specifying that the directory listing file always gets saved in the same location.

  2. Using the Start command to open the file with Notepad.

Here is the modified batch file.

dir /a /b /-p /o:gen >C:\Temp\List_Files.txt
start notepad C:\Temp\List_Files.txt


The following modification was submitted by Max

Hello, I enjoyed learning how to create file listing with the method provided on http://www.theeldergeek.com/file_list_generator.htm
I have however created a modification that people should enjoy.
By adding the line cd %1 to the top of the bat file, you can right click on a folder select Create a File List, and then the txt file will be saved inside that folder with a listing of the contents of that folder.
The next modification prevents the generated textfile from being listed within its self. The two lines are added under the dir command.

copy “C:\Temporary Location\textfile.txt” %1

del “C:\Temporary Location\textfile.txt”
Thus, my entire bat file looks like this:
cd %1
dir /a /b /-p /o:GEN >”C:\Documents and Settings\\Local Settings\Temp\filelist.txt”
copy “C:\Documents and Settings\\Local Settings\Temp\filelist.txt” %1
del “C:\Documents and Settings\\Local Settings\Temp\filelist.txt”
Please remember to use the quotations…otherwise, dos won’t be able to deal with the spaces.
Enjoy,

Max


The following modification was submitted by Kevin

I’ve been trying to figure out how to capture a listing of files from within a folder — but I don’t want to print the list, just save it to a disc. (I’m sending a buddy a listing of all of the CD’s that I’ve burned.)

I found your article entitled, “Generate a File Listing from a Windows Explorer Context Menu” — and although none of the solutions worked perfectly for me, I did some minor editing to give me what I needed.

I needed a batch file which would create a listing, allow me to cut, copy or print the contents, then delete the file itself (I have no need for a permanent file listing cluttering up my hard drive).

Here it is:

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

TeraCopy is truly the best way of copying files in Windows

January 13, 2009


Overview:

TeraCopy is a compact program designed to copy and move files at the maximum possible speed, providing the user a lot of features.

Features:

* Copy files faster. TeraCopy uses dynamically adjusted buffers to reduce seek times. Asynchronous copy speeds up file transfer between two physical hard drives.

* Pause and resume file transfers. Pause copy process at any time to free up system resources and continue with a single click.

* Error recovery. In case of copy error, TeraCopy will try several times and in the worse case just skips the file, not terminating the entire transfer.

* Interactive file list. TeraCopy shows failed file transfers and lets you fix the problem and recopy only problem files.

* Shell integration. TeraCopy can completely replace Explorer copy and move functions, allowing you work with files as usual.

* Full Unicode support.

Review:

Copying large files in Windows XP just sucks, a lot. Not only do you get subpar speeds most of the time, the damn remaining time fluctuates so much that you wonder how nobody at Microsoft could come up with something better. Thankfully there is a much more competent alternative in the form of TeraCopy. Not only TeraCopy is faster that the standard explorer copy it can also pause and resume transfers, skip bad files without canceling the whole copying process, add files to the queu in an already started copying process and completely replace the standard Windows explorer copy which is something truly awesome and handy. Teracopy also shows accurate progress reports in the form of percentage of copying so far, time remaining, numbers of files to be copied and did i mention it’s portable? For all this reasons i truly suggest you ditch the old crappy way of copying files in Windows and use TeraCopy. Available for Windows 2000/XP/Vista.

Get it at http://www.codesector.com/teracopy.php

Kakasoft`s File encryption provides a quick but light way of encrypting your files

January 13, 2009


Overview:

Kakasoft`s file encryption is a very simple but efective file encryption utility

Review:

Kakasoft`s file encryption makes some promises that it doesn`t keep, for example it claims that it has:

1. Four encryption algorithms Blowfish, AES, MD5, Triple-DES.
2. Strong key support, handling and cryptographic implementations.
3. Encrypts megabytes of file data per second on modern machines.

the first i dunno if its true because when you encrypt stuff it doesn`t give you any option to select the encryption algorithm!, the second claim also can`t be verified without knowing the type of encryption and the third claim is the one i am willing to to concede its true because it encrypted stuff fast. So why i am posting this program if some of the stuff it claims can`t be verified?, well its because it works in a very basic but effective way. When you start the program you will see the interface of the picture i have uploaded into my post, click in “Add files” to add one or several files and type a password, if you select 2 or more files to be encrypted at the same time each one will have the same password which is a bad idea from a security standpoint, anyway after inputting a password click “Encrypt” and the selected files will have their extension changed into .encrypt and will have a new icon and also can only be decrypted by launching the file and inputting the correct password however the filename and the original extension will be visible to anyone , that is a problem if your filename is something like BIGBOOBIESANDASSES.AVI so you better rename the file you want to encrypt beforehand to something less conspicuous. Now after the file has been encrypted even if you change the extension to what it was originally and open it you will only get a message that the file has been corrupted. Kakasoft`s file encryption will probably stand low level users from getting into your files (read: your mom) but i dunno if it will stand high level users (Read: The feds) i wish i was an advanced computer technician in order to confirm this.
In conclusion Kakasoft`s file encryption is probably a good encryption utility but i wouldn`t recommend it for keeping your credit card info secret, it is better suited in my judgement to keep your porno videos secure from your mom,dad, or little brother`s prying hands. Available for all versions of Windows.

Get it at http://www.kakasoft.com/freeware.htm

Gsplit is the mother of all file splitting utilities

January 12, 2009

Overview:

This application is a free reliable file splitter that lets you split your large files (like Self-Extracting archives, Zip archives, disk images, multimedia, music, video, backup, image, archive, log, large text, document files…) into a set of smaller files called pieces.

Review:

Gsplit is a file splitter program with some very interesting features that put it above most other free splitters. For starters Gsplit can use two type of pieces when splitting files: Spanned pieces and Blocked pieces. Spanned pieces are used to split files directly into several disks like for example floppies. All you have to do is to to insert a new disk when prompted and Gsplit will automatically calculate the pieces size until it completes the splitting process. Blocked pieces are just your standard fixed size pieces. By default Gsplit creates a small executable (SFU) when you split files, this is used to unite all the created pieces otherwise you will have to use a small tool called “GUnite” to merge the pieces back to their original state. This SFU (self-uniting functionality) can be configured to display custom messages, set a default folder for extracting files and even set to work in silent mode among other things. You can store info into created pieces like dates and perform checks to see if a piece is corrupted and promptly replace it with a new good piece. Finally Gsplit is fully portable you can carry it with you all the time.
Gsplit is easy to use and is simple enough for the average user however it’s large quantity of power features makes perfect for people that are just constantly sharing files on the web and need an advanced splitter. Available for all versions of Windows.

Get it at http://www.gdgsoft.com/gsplit/