You are visitor number since 26 July 2005
Go to Howard Kaikow's home page
Copyright © 2005-2000 by Howard Kaikow. All rights reserved.
Date: 3 July 2009
Author: Howard Kaikow <firstname.lastname@example.org>
Subject: Get File Type Distribution program
Download GetFileTypeDistribution program
The Get File Type Distribution program will create a list of the file name extensions ("file types") on each drive and path you identify, giving the following information for each file type:
Originally, the program was intended to determine how much disk space was being used by each file type on each drive. I did this because I am/was very displeased with the defaults used for file compression by a particular widely used backup program. Subsequently, I tried other backup programs which allow a virtual drive to be mounted from the backup set. I was curious as to how closely this reflected the actual files on the real drive, so I modified the program to analyze paths, as well as drives.
The program offers you a choice of outputting to a Microsoft Excel workbook ("workbook"), a text file, or both a workbook and a text file.
If you choose to output to a text file, each file will be created in the same directory in which you have placed the executable file. The text file uses TAB character delimiters to facilitate your formatting the list as desired.
If you choose to output to a workbook, a hidden workbook will be used. The workbook will be displayed upon normal termination of the program. The program displays, but does not save, the workbook. It is up to you to save the workbook.
Each list of file types is sorted by the percentage of the space used on the drive.
The program was compiled using Microsoft Visual Basic 6 (with SP 6) and the Microsoft Excel 97 library, so the program should work with Excel 97, Excel 2000, Excel 2002, and Excel 2003. It is not necessary to have Microsoft Excel to use the program, unless you wish to output to a workbook.
In order to run this program, you will need to have the following installed:
Windows 2000, or later.
Microsoft Excel (Optional): If you wish to output to a workbook, it will be necessary to have installed Microsoft Excel. Versions prior to Excel 97 will not be supported.
Either Microsoft Visual Basic 6 or the Microsoft Visual Basic 6 run-time files: If you have neither, then you can download the Visual Basic 6 run-time files by following the instructions in VBRun60.exe Installs Visual Basic 6.0 Run-Time Files.
I have developed the program using Microsoft Windows 2000, but expect that the program will work in other Microsoft Windows operating systems. I am aware of only the following restrictions:
For each Path, a spreadsheet will be created having a base name of "Path" or "Path-n", where "n" is an integer number. For example, if you requested analysis of three paths, the workbook will include spreadsheets with base names of Path, Path-1 and Path-2. The actual path is listed in the spreadsheet.
Note: It is not possible to have meaningful spreadsheet names using the actual path because paths will include characters that are not allowed in a spreadsheet name, and the length of a spreadsheet name may not exceed 31 characters.
For each drive, a spreadsheet will be created having a base name of "D" or "D-n", where "D" is the drive letter and "n" is an integer number. For example, if you requested analysis of, say, drive F twice, the workbook will include spreadsheets with base names of F and F-1.
If a spreadsheet requires more rows than permitted in a worksheet, multiple spreadsheets will be used. For example, if it was necessary to use two spreadsheets for drive G, the spreadsheets may be named G(1 of 2) and G(2 of 2), . In general,when multiple spreadsheets are used, the spreadsheet names will be base(1 of m) to base(m of m), if m spreadsheets were used to list the file types for that base drive or path.
Using the above naming convention, it is possible that a spreadsheet name would exceed the 31 character limit. In this case, the spreadsheet will have whatever unique name was assigned when the spreadsheet was created by Microsoft Excel, e.g., "Sheet10".
A separate text file is saved for each drive and path analyzed. The base name for each file is determined the same way as for a spreadsheet. If necessary, "-n" is used to create a unique base name. The file name is then constructed by adding ".FileTypes.txt" to the base name.
If the above conventions do not result in a unique file name, the program will attempt to use certain alternative conventions. If the program is still unable to determine a unique file name, then a text file will not be output for the particular drive or path.
There is no installation necessary, just directly run the program by double-clicking on the GetFileTypeDistribution.exe file, or by using a shortcut to that file.
When you run the program, a Visual Basic 6 Form will be displayed that looks something like the Form below. The Form was designed using a screen resolution of 1280 x 1024. You may resize (with constraints) the Form to make the Form better fit on your screen. You may minimize the Form to get it out of the way (the minimized Form will flash to let you know when the drives and paths have been processed).
The Form includes the following controls.
Select one, or more, drives
|Select the drives you wish to have analyzed.|
|Paths selected||Lists the paths you have selected for analysis.|
Select one, or both, forms of output.
Select All Drives
|Select all drives.|
Unselect All Drives
Unselect all drives.
|Select the root of a path you wish to be analyzed.|
|Remove selected paths||Select one, or more, paths in the Paths selected list, then use the Remove selected paths button to remove the selected paths from the list.|
|Make Lists||After you have selected at least one drive or path, the Make Lists button permits you to run the analysis for the selected drives and paths. The number of milliseconds used will be displayed when processing is completed for each drive and path.|
|Clear Lists||The Clear Lists button will be displayed after all selected drives and paths have been analyzed. Clicking on the Clear Lists button will unselect all drives and clear the list of paths, enabling you to do further analysis.|
|Bye Bye!||Exit the program. If workbook output was selected, a workbook will be displayed.|
|Include Percentages||Check to include percentage columns. Uncheck to facilitate comparison with other drives/paths, or an earlier/later version of the same drive/path.|
|Check the program version.|
The program has no device dependencies, and should work with any logical volume. The program has been used with logical volumes on hard drives, flexibile disks, ZIP disks, and optical media (CD-ROM, CD-R, and CD-RW). I do not have DVD drives, but those should work as well.
In order to mount a volume from a backup program, the backup program has to supply a file system filter driver that interfaces with the native file system. Apparently, there are some differences in the way those drivers are implemented for various products. I have mounted virtual volumes using both Acronis True Image 9 and Symantec Ghost 10.
All volumes that I have mounted using Acronis True Image 9 have worked with the the program.
However, some volumes mounted from Ghost 10 have not worked, i.e., the program hung up trying to access files for those volumes. Indeed, in this case, you may have to do a hard reboot.
This makes no sense as the program processes all logical volumes the same way and has no way of distinguishing between actual logical volumes and virtual logical volumes, nor does the program even know, or care, how the volumes were mounted.
The problem occurs in other programs using very simple code.It is possible that this problem occurs only in Microsoft Windows 2000. I do not currently use Microsoft Windows XP.