Author: Dan Mares, dmares @ dmares . com
Portions Copyright © 2004-2014 by Dan Mares and Mares and Company, LLC,
Phone: (770)237-8870
Last update: Sept 1, 2014



The mak_html program allows you to create an html file, (index.htm, or any specific name the user chooses) which has links to all the files in a specific folder/tree identified by the user.

Many people find this useful when, during their examination and report, they have exported a number of files to a folder. Once these files have been exported to a folder, the user now wants to create an index.htm that will allow a someone with a traditional internet browser (Netscape, IE, Mozilla, etc) to view and browse the listing of the files.

There is a beta Linux version ready for those who would like to try it. Contact me at 770-237-8870 for information on the Linux version.


BUGS/Operational Challenges

During a test on Sept 1, 2014 it was found that in some cases where your browser did not properly set file associations when a link in the program output was hit, it did not properly find the file. This was determined to be a problem with the operating system/browser linking, and not the code created in the output of this program. Check/confirm your browser file associations to produce a remedy for this operations.



This program takes on the command line, a starting path (folder), an option indicating the file types to process (default is all) and an output htm file name. If no specific output file name is included, then index.htm is defaulted.

The program traverses the the path identified, locates the files meeting the criteria and creates an output file (.htm) with links to all the appropriate items.

As the program creates output, it makes a different section for each folder it traverses making it easier to identify where the files are located.

E_Mail Message attachment Handling

A special case exists when the file being processed is an html file of an e-mail message. Similar to the type of e-mail message exported using FTK. Within that htm file, is an indication of any attachments that might have been with the message. (It is the users responsibility to make certain all attachments are located in the same folder as the e-mail message.) When the program finds an html file with the extension .htm or .html, it opens the file and looks for the FTK e-mail attachment trigger within the file. If it finds such a trigger, it takes the attachment file name and makes another link to the file. The attachment files located in the folder, must be named appropriately. So DO NOT allow FTK to add the unique number to the filename. Also, make certain the files are located in this folder with the appropriate e-mail.

The output file is a clean html file which is easily edited to adjust font sizes and colors. However a basic knowledge of html coding is needed, or a good html editor. Simple editing of the full path identified in the link with a relative (. or ..) path will make the output file portable to a CD or other storage medium.

D:\Work\C70\MAK_HTML\release\test\path2\Base.obj">    becomes:

The output looks similar to the following output.
Thu Dec 16 12:05:19 2004
 Attachment: Picture.jpg
 Attachment: Picture2.jpg

Number of files processed: 10


Command Lines

C:>mak_html [-[options]]

C:>mak_html -p c:\tmp -h index

scan the c:\tmp directory, and create an index.htm file with links to all files found.

C:>mak_html -p c:\tmp -f *.doc -h myindex
perform opeartions only on the *.doc files and make the index file named: myindex.htm



-p + source_dir    Use this directory as the source (starting point).

-f + filetype(s)    Process only those files meeting this file type. Additional file types (max of 10) can be added by separating each one by a space. (ex,. -f *.c *.doc *.tmp *.ppt )

-x + filetype(s)   eXclude those files meeting this file type. Additional file types (max of 10) can be added by separating each one by a space. (ex,. -x myfile*.c ) Whatever filename is given with the -h options, is automatically excluded.

-[Hh] + filename:   create the html output file with a name of filename.htm. If the -H is used, then the relative filename path is used in the link section of the output, thus making it easier to create a useable CD with appropriate html links. If the -h is used, then absolute paths are used, and may require a modification for some users. It is suggested, that if the report is being moved to a CD, that the -H (upper case) option be used.

-A:    Process the FTK generated e-mail attachments. FTK exported E_mails creates htm file with internal links to attachments which it also exports. These attachments are linked with specific triggers in the e-mail message file. The -A option will cause the attachments to be linked and identified properly on the output of the program.

-T + Report Title:  The title of the report. If you include spaces in the report title, it MUST be within quotes. (ie. -T "Report Title is This"). If no title is included, a default title is used.

-g + #
-l + #   
Process only those files (g)reater than or (l)ess than # days old. Replace the # with a valid number of days. And don't include the +.

-g + mm-dd-yyyy
-l + mm-dd-yyyy
:  (that's and ell, not a one). Process only those files (g)reater (older) than or (l)ess than (newer) than this mm-dd-yyyy date. The date MUST be in the form mm-dd-yyyy. It MUST have two digit month and days (leading 0 if necessary), and it MUST have a 4 digit year. The date given mm-dd-yyyy is NOT included in the calculation. Ie. if today was 01-10-2003 and you entered -l 01-09-2003 you would only process todays files. If you wanted to include those on 01-09, you should have entered -l 01-08-2003.

-t[acw]    Specify which time type to use in the calculations. The a= =access, c= =create, w= =last write/modify time. Donít forget, in WIN9X, there is no access time.

-G + #
-L + #   
Process only those files (g)reater than or (l)ess than # bytes in size. Replace the # with a valid file size.

-5:    Installed, (Sept 1, 2014). Calculate the MD5-Hash of the file and include in the output record. This can be used to visually check/confirm any duplicate hashes.

Related Programs