www.boulderwall.com

f2xml - File to XML

Table of Contents

Please send questions, comments, requests for features to help@boulderwall.com .
 
Please note: The demonstration version of f2xml is fully functional except that random files will be reported as BOULDERWALL.com with a filelength of 1 byte. Purchasing a license (via www.boulderwall.com) will remove this restriction.

Overview

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:

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.

Getting Started

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.

f2xml -- The Graphical User Interface

Output formats

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

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.

Output Fields

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.

Sorting the output

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.

Filtering the output (or searching for specific files)

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.

Image specific web page creation

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.

MP3 specific web page creation

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.

Custom translations (using XSLT)

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

http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?url=/MSDN-FILES/027/001/485/msdncompositedoc.xml

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

http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/001/766/msdncompositedoc.xml

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.

Command line options

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]

Examples:

The DLL interface

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.

 

 

 

 

 

 

Accessing the DLL through Visual Basic

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 Output

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 Output

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 Output

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.

Registering f2xml

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 .