f2xml creates XML, HTML or TEXT based reports on your file system or removable storage (CD's, floppy disks, etc). The HTML and TEXT based output provide self contained reports. The XML format allows for further analysis to provide whatever details you need from your file system.
f2xml provides detailed information on what is stored on your disk(s) and allowing a wide variety of disk based tasks and reports, such as:
Finding zero length (empty) files
Listing duplicate files
Sorting files and folders to find the largest files.
Keep track of all files stored on CD's, or floppy disks such that they can be accessed without re-loading the media (eg for large music collections archived to CD),
Extract images from a file hierarchy and present as a web page, or set of web pages.
Create web pages with thumbnail images, linking to the full images.
Find all MP3 music files on your disk.
Fast file searches looking for file names, sizes, content, etc. The output may be further refined. For example, to search for all DLL's, then run a second utility to check that each DLL is the current version.
Provides a base set of functionality for a customized disk management capability -- delete all backup files, show me the new files since the last snapshot was taken, what new dll's have been placed on my system...
etc.
In addition to the graphical user interface, a command line and DLL interfaces are provided. The DLL may be used in your own applications to provide the same functionality as provided in f2xml. The command line and DLL interface is documented below and a sample Visual Basic application is included.
f2xml may be customized by writing XSLT code to transform the XML output. Sample XSLT is provided with the download and may be invoked from the "Custom" tab of f2xml.
After installing f2xml (see install instructions), double click on the desktop shortcut for f2xml. You should see something like this. Select the output format you would like, ensure that the "show output" field is selected, then hit the "Create Output" button. A short time later a browser (for HTML and XML) or text editor window (for TEXT) window should appear with file details of the selected Folder (by default, the folder f2xml is installed in).
In the HTML output, files are hyperlinked to their actual file. Selecting an image reference, for example will display the image. Selecting a sound file will (typically) play that sound.
Try selecting the output fields tab and add/remove selections, then the sort tab to change the ordering. Create Output will re-run the query and show the results. The filter tabs provides a way to reduce the output, to files less then a certain size, to .dll's, to those containing the word 'foobar', etc.
The images and MP3 tabs provide more direct access to image and music files, allowing you to scan your disks for such files and provide a web page of the output. Image and MP3 queries will only output HTML format.
Selecting the custom tab provides access to transformations on XML output. That is, generate an XML based report first, then use "Custom" to extract specific data. For example, change the folder to be your desktop, create an XML output file to desktop\size.xml . Then move to the "Custom" tab and select "empty.xsl" for the "XSL Code" line. It should be available in the list when you select "Browse" next to XSL Code. Once selected, use "Transform XML" and you should see a list of all zero length files. Note that for file sized transformations to work, the output fields must include the file size option (which is on by default). See below for how to change the output fields.
For details on how to customize the output, please see the following sections.
Select the Text, HTML or XML option boxes to switch between those output formats. The output filename suffix will change accordingly.
The Folder text box is the path to start the file/folder analysis at. Change by typing in a new path, or selecting browser and using the popup dialog to choose a starting folder.
The Output file text box is where the generated output file will be written to. Change by typing in a new path, or selecting browser and using the popup dialog to choose the output file.
Three predefined queries are provided to report on
Zero length files, that is where the bytes size = 0.
All of the files and folders sorted with the largest first.
Files created or modifies in the last day.
When one of these is selected, none of the settings in the other tabs (eg output fields) take effect. The customize the output, select the top (None --...) option from the Standard reports section.
Create Output is used to create a report. It applies across all of the 'tabs', except for "Custom" which has a separate "Transform" button. If the show output checkbox is enabled, when the result file is available it will be shown. The default browser is used to display HTML or XML, and text viewer for TEXT files.
When a report is being generated, you can cancel the operation by reselecting the "Create Output" button which will have been relabeled Cancel. A progress message is displayed above the Create Output button.
Help will display this help file in the default browser.
Close exits the application, saving the current value of any options.
Selecting the Output Fields tab provides the above options for customizing what gets put into the output file for each file or folder. Note that folder size includes the size of the entire hierarchy stored within that folder, that is, all files and sub-folders.
Output may be sorted by Name, File type, Creation date, or file size. Either in ascending or descending order. The default is no sorting.
Note that when sorting files, no folder hierarchy is included in the output. That is, all of the files are sorted in one group. Each file will still show its full and relative path in the file system if those fields are enabled in the Output Fields tab.
To restrict the output, or search for a specific file set, use the filter tab options. Entering search parameters in any of the fields will restrict the generated output. Note that the filtering takes effect even when the Filter tab is not visible.
The Image tab allows image specific web pages to be created. Enter the folder to start looking for images, select either the thumbnail or full image option, then select whether a single output file will be created, or to split the output based on folders or image count, and hit Create Output. The resulting HTML will show the images (or thumbnails) and if split across multiple output files will contain forward/backward navigation.
The MP3 tab simplifies searches for sound files. Select the "create web page from sound files" option and a web page will be created listing all sound files.
The Custom tab allows further transformation of generated XML through XSLT. The Microsoft MSXSL transformation engine is provided with the f2xml package and invoked when this option is used. Please see
for more details on MSXSL. Please note that MSXSL requires the Microsoft XML Parser 4.0 (msxml4.dll). If the Custom transformations are not working for you, please see
for further information, and download information.
To use: first select the input XML; this should have been generated previously by selecting "Create Output" with the XML option set in the Output Format tab. Then select the XSL Code. 4 examples are provided with the f2xml package within the XSL folder:
After the selecting the required XSL, hit Transform XML and if the Show output tab is selected, the resulting HTML will be displayed in a web browser. More XSL files may be added to suite your needs. Please email help@boulderwall.com with specific requests or suggestions.
f2xml can be invoked from a DOS shell. The command line parameters are (optional arguments are in [ ]'s):
f2xml folder output_file [-t 0 | 1 | 2 ] [-o <fields>] [-d depth] [-fn name] [-fo operator] [-fs size] [-ft file type] [-fc content] [-sb sortby] [-sd direction] [-h hours]
-t sets the output format, TEXT = 0, XML = 1, HTML = 2.
-o sets the output fields. This is a single integer value set by adding the following (taken from the DLL description):
FILE_SIZE 1
FILE_CDATE 2
FILE_MDATE 4
FILE_ADATE 8
FOLDER_SIZE 16
FILE_TYPE 32
FULL_PATH 64
TOTAL_FILE_COUNT 128
LOCAL_FILE_COUNT 256
INDEX_VALUES 512
XML_DTD 1024
RELATIVE_PATH 2048
FILE_ALL_ATTRIBS -1
For example, to set the fields File_size and folder_size only, you would pass in -o 17 (1 + 16).
-d sets the depth, or number of folder levels to traverse into. 0 means "no limit", which is the default.
-fn name sets the filter name, ie to match some part of the filename.
-fo operator sets the operator to use when comparing file sizes ("<", "<=", ">", ">=", "!=" or "=")
-fs size sets the file size filter, used with the -fo option.
-ft file type. eg -ft "dll" will limit output to dll files.
-fc content will limit output to those files containing the string "content".
-sb sortby sets the sort order, with possible values of
NOSORT 0
NAME 1
TYPE 2
DATE 3
SIZE 4
-sd direction to sort, 1 = ascending, 0 = descending.
-h hours will limit output to just those files changed in the last 'n' hours.
Examples:
f2xml c:\\winnt\\system32 c:\\system32.xml -t 1 -o 17
Create XML listing for the contents of the c:\\winnt\\system32 folder. Output file and folder sizes.
f2xml c:\\winnt\\system32 c:\\system32.html -t 2 -o 17 -sb 4 -ft dll
As above, only restricting output to dll's sorted by file size and in HTML format.
f2xml "c:\\documents and settings\\bw\\desktop\\boulderwall" "c:\\documents and settings\\bw\\desktop\\out.xml" -t 2 -fo "<" -fs 1000
Create desktop file out.xml containing an HTML report of files less then 1000 bytes in size.
The DLL is called filelist.dll and is provided in the f2xml install folder together with its include file filelist.h . Details for accessing the DLL through Visual Basic are provided below.
int Init(const char *key);
Required before any other call to initialize f2xml.
Returns 1 for a valid license, 0 for invalid.
If an invalid license, random files names will be replaced by BOULDERWALL.com in the output
Example
int r = Init("foobar");
int CreateXML(int output, const char* folderIn, const char* outputfile)
Creates HTML, XML, or TEXT based output depending on the value of output.
Use defined values outputXML, outputHTML or outputTEXT.
folderIn should be the full path to the root folder to be explored.
outputFile should be the full path to the file in which the output will be written.
Returns 0 for success, -1 if the folder can not be opened and -3 if the output file can not be written.
int SetMaxFolderDepth(int depth);
0 indicates that the full folder tree should be traversed.
> 0 sets the limit for how many folder levels will be descended into.
Default (if not called) is 0.
Example
r = SetMaxFolderDepth(1); // don't leave this folder
int SetImageOutput(int imageOut, int split, int count, int theight, int twidth)
If ImageOut > 0 then the next call to CreateXML will cause an HTML (only) page to be generated containing image files only.
If ImageOut == 1 then thumbnail images will be included in the output. In which case, theight and twidth are used to define the height and width of the thumbnail. A value of 2 will show the full images.
if split == 0, no file splitting fill take place. If split == 1 then the output will be split along folder lines. If split==2 then the output file will be split into groups of count images.
int SetMP3Output(int mp3Out, int split, int count);
If mp3Out> 0 then the next call to CreateXML will cause an HTML (only) page to be generated containing sound files only.
if split == 0, no file splitting fill take place. If split == 1 then the output will be split along folder lines. If split==2 then the output file will be split into groups of count files.
int SetReturnFields(long fields);
fields defines which output fields are included in the output. It set by adding the required values from:
#define FILE_SIZE 1
#define FILE_CDATE 2
#define FILE_MDATE 4
#define FILE_ADATE 8
#define FOLDER_SIZE 16
#define FILE_TYPE 32
#define FULL_PATH 64
#define TOTAL_FILE_COUNT 128
#define LOCAL_FILE_COUNT 256
#define INDEX_VALUES 512
#define RELATIVE_PATH 2048
(or to get all values, use) #define FILE_ALL_ATTRIBS -1
Example
r = SetReturnFields(FOLDER_SIZE + FILE_SIZE + INDEX_VALUES);
int SetFilter(const char *fname, const char *opSize, long size, const char *ftype, const char *contains)
SetFilter defines the options to reduce the returned output by seeing if each file passtores various checks.
if fname is not an empty string (""), the filenames returned must contain this string.
opSize should be NULL if not being used. It defines the operator to be used when comparing file sizes
int ModifiedRecently(int hours);
If hours is no zero (the default) calling ModifyRecently will restrict files returned via CreateXML to be within that number of hours old. eg to find all files created or modified in the last hour, use
r = ModifiedRecently(1);
int IgnoreCase(int ignore);
ignore == 1 will result in case insensitive string comparisons (eg Foo == foo).
int IncludeHidden(int hidden);
hidden== 1 will result in Windows hidden files and folders being included in the output. Default is that they are not.
int IncludeSystem(int system);
system== 1 will result in Windows system files and folders being included in the output. Default is that they are not.
int SortBy(int sort, int ascend);
sort should have one of the following values, and determines the order in which the files are sorted (if any).
#define NOSORT 0
#define NAME 1
#define TYPE 2
#define DATE 3
#define SIZE 4
A value of NOSORT (0) wil return the files in the order they are read from the filesystem. For other values, files are returned sorted relative to all of the files returned (ie not on a folder by folder basis). As such, the folder hierarchy is not shown in the output, but each file is still shown with its full path (if the call to SetReturnFields include the full path selection).
int SetCheckFunction(CheckFunction);
The parameter is of type
typedef bool (*CheckFunction) (const char *);
This function will be called with a (char *) parameter indicating the current status. For example, what folder is being looked at, or when sorting starts. It can be used to update status information on a user interface. If the called function returns a non-zero value, CreateXML will stop and return without any further output.
In order to access filelist.dll through Visual Basic, module f2xml.bas should be included in your project. This is available in the f2xml install folder and is included in the sample Visual Basic project called VBSample .Constant values, such as
Public Const XML = 1
Public Const HTML = 2
Public Const TXT = 0
are also defined in the f2xml.bas module. The individual functions are described above.
ret = f2xmlInit( "Provide License Key Here" )f2xmlSortBy SORT_NAME, UP
ret = f2xmlCreateXML( XML, "c:\\tmp", "c:\\out.xml" )
HTML based output has the following format:
Files are included within folders and indented to show the hierarchy. Except when sorting is enabled, where all files are shown below the single root folder.
The fields shown for each file and folder are defined by the Output Fields tab.
Filenames are hyperlinked to the actual files. Folders will display the corresponding folder. The asterix (*) following each file and folder will display the parent folder; that is the folder to which this file or folder belongs.
XML based output has the following format:
Files are included within folders and indented to show the hierarchy. Except when sorting is enabled, where all files are shown below the single root folder.
The fields shown for each file and folder are defined by the Output Fields tab.
TEXT based output has the following format:
Files are included within folders and indented to show the hierarchy. Except when sorting is enabled, where all files are shown below the single root folder.
The fields shown for each file and folder are defined by the Output Fields tab.
f2xml is shareware. Registration allows unlimited use by a single user. Pricing for a single user non-developer version is $19.95. To use the DLL interface in your own applications, the cost is $99.95, which includes 10 end user licenses for f2xml, or any application you create from the f2xml interface.
The license fee does not include redistribution rights, but that is available upon request. Please email help@boulderwall.com to discuss redistribution, multi-user purchases, or anything concerning registration of f2xml.
Please send questions, comments, requests for features to help@boulderwall.com .