Author: Dan Mares, dmares @ dmares . com
Portions Copyright © 2004-2026 by Dan Mares and Mares and Company, LLC,
Phone: (678) 427-3275 (leave message)
Last update: March 29, 2026
This is a command line program.
MUST be run within a command window as administrator.
DO NOT attempt to run this from the RUN menu.
ALSO: remember when entering paths with spaces, they "need to be quoted".
One liner: Generates htm file with links to selected files in the "./folder/directory" for easy review.
Get mak_html.exeThe 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 "selected/chosen" 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 someone with a traditional internet browser (Netscape, IE, Mozilla, etc) to view and browse the listing of the files.
MAJOR NOTE
Because the program creates an html file, it should be understood that html "links" are
hard coded within the html (index.htm is the default output) file. Generally the link part looks somewhat like
< A HREF = "//C:\tmp\command_line.bat " > command_line.bat < /A > (spaces added to show actual command)
Ignore the actual coding words except for the segment pointing to the file location being linked. In the case
above the command_line.bat file is expected to be found (absolutely) in the tmp directory of the C: drive. (C:\TMP)
However, in a lot of cases when a report (containing these files) is delivered, the user would most probably move the files identified by the program
to other locations. For instance if you were creating a report to deliver to a reviewwer. In that case the reviewer would most likely place the
index.htm and the associated file(s) in a directory of their choosing, which is not C:\tmp. So the files may now end up at:
D:\investigations\case_xyz\command_line.bat
When the user opened the index.htm in their browser, and clicked the link to the bat file, the browser would say, sorry, can't
find the file. Because the coding points to a file living in the c:\tmp directory not the D: drive work location where the current user has placed
the files.
In order to fix this problem an option -H (upper case H) generates code in the index.htm which is a "relative" location meaning the code to the link
now looks like
< A HREF = "//.\tmp\command_line.bat " > command_line.bat < /A > (spaces added to show actual command)
Notice the absolute link to the c:\tmp is now replaced by a relative pointer to the dot (.) meaning current directory. So now,
when the user takes the data (evidence) and the index.htm file to their work computer they create a directory wherever they wish and
place all the data (index.htm and the files) within a subdirectory named D:\anywhere\tmp\....
Now the index.htm located in the SAME D:\anywhere directory sees a subdirectory called tmp where the data pointed to lives. And the
browser can now find and display the data.
READ THIS AND FOLOW IT CAREFULLY
The best way to get the relative (.) pointer to your evidence when the user "moves" the evidence to a new location of their choosing is to use the
-H index.htm option. If this upper case -H option is not used, then all the links are absolute links and moving the files to another location
will not allow a browser to find the links.
The differing URL pointers (//C:\tmp\, or //.\tmp\) generated by (the default of not useing either H) the -h and -H output make a big difference in
your choice of which one to use. Especially if you are going to copy the entire tree to say, a thumb drive and provide it for review. In that case,
chances are the URL links to an absolute location: D:\TMP\XYZ will not longer be effective since the user has the thumb drive set to K:. So be aware
of which -hH option provides the best generic output for your reporting and delivery. Use -H index.htm whenever you "think" the user will place the
evidence in another folder of their choosing.
Quick reminder: Not using either -hH option will generate a default index.htm file in the current location with absolute links. So consider using the
-H index.htm in most all of your runs. It is more generic.
Have I made this explantion confusing enough. I didn't mean to. So,
practice practice, test test test.
Currently, in order for the program to best create the correct links within the index.htm file generated, the user SHOULD run the program
either from the parent of the target directory, or within the directory itself. As shown below.
So if the files you wish to include in the index.htm that is created are located within the C:\CASE_FOLDER\EVIDENCE directory. Your default prompt
should be one of the following. (preferrable the first).
C:\CASE_FOLDER or:
C:\CASE_FOLDER\EVIDENCE
This program takes on the command line, a starting path (folder, -p . meaning current folder, best choice). The output or report_folder is generally
the default folder, unless a specific path is provided using one of the -Hh options. If no -Hh option is used, the current default folder is where
the default index.htm file is placed.
The -p option preferrably should be the default directory, but an absolute location can be provided. So that option optimally looks like: -p . or -p
K:\cases\evidence\target_dir_parent.
An option indicating the file types to process (-f *.docx *.xlsx *.xxx) (default is all).
Optional -hH creating an output htm filename.htm (-H
my_index.htm) is possible. But the default is index.htm in the current directory. Using either of the upper -H or lower -h creates different URL
pointers within the index.htm file and should be thoroughly tested.
Rename it (the htm file) after the run if you wish.
Using the -Hh option requires a specific output .htm filename to be include. -H K:\tmp\indexit.htm etc.
If no specific output (-Hh option) file name is included, then index.htm is defaulted to the current working directory,
which hopefully is the top of the directory holding the data to process. TEST TEST and RETEST your command lines to make certain you are
getting the output needed. Check the command line section below for samples the will work.
The program traverses the the path identified, locates the files meeting the criteria and creates an output htm file (default index.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 within the users evidence tree.
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.
The output looks similar to the following output. Remember, all the links are relative to the top level folder that was the original source folder when the program was run.| "MAK_HTML" HTML GENERATED OUTPUT |
| Thu Dec 16 12:05:19 2004 |
| D:\Work\C70\MAK_HTML\release\test\path2\ | |
Filename | Location/Folder |
| Accting.obj | D:\Work\C70\MAK_HTML\release\test\path2\Accting.obj |
| Init_lib.obj | D:\Work\C70\MAK_HTML\release\test\path2\Init_lib.obj |
| Options.obj | D:\Work\C70\MAK_HTML\release\test\path2\Options.obj |
| Program.obj | D:\Work\C70\MAK_HTML\release\test\path2\Program.obj |
| Timerest.obj | D:\Work\C70\MAK_HTML\release\test\path2\Timerest.obj |
| D:\Work\C70\MAK_HTML\release\test\ | |
Filename | Location/Folder |
| Accting.obj | D:\Work\C70\MAK_HTML\release\test\Accting.obj |
| Base.obj | D:\Work\C70\MAK_HTML\release\test\Base.obj |
| Fixname.obj | D:\Work\C70\MAK_HTML\release\test\Fixname.obj |
| Init_lib.obj | D:\Work\C70\MAK_HTML\release\test\Init_lib.obj |
| E_mail.htm | D:\Work\C70\MAK_HTML\release\test\E_mail.htm |
| Attachment: Picture.jpg | |
| Attachment: Picture2.jpg | |
C:>mak_html [-[options]]
Preferred: simplest to run from current directory
C:>mak_html -p .
scan the current default directory, and create a default index.htm file with links to all files found.
C:>mak_html -p c:\tmp -h index.htm
scan the c:\tmp directory, and create an index.htm file with absolute links to all files found.
C:>mak_html -p c:\tmp -f *.doc -H myindex.htm
perform opertions only on the *.doc files and make the index file named: myindex.htm with relative (.\xyz) pointers. TEST it.
SAMPLE COMMAND LINES THAT WORK
All below except for the -H options create absolute links to the targets. Review the output and test thorougly the command lines.
H:>mak_html -p . -f *.docx   default index.htm created with absolute links
H:>mak_html -p . -f *.docx -h index_h2.htm
H:>mak_html -p . -f *.docx -H index_h1.htm This should create relative links in the index_h1.htm file.
H:>mak_html -p h:\temp\junk_del -f *.bat
H:>mak_html -p h:\temp\junk_del -f *.bat -h index_h3.htm
H:>mak_html -p h:\temp\junk_del -f *.bat -H index_h4.htm
H:>d:\work\c70\mak_html\release\mak_html -p h:\temp\junk_del -f *.bat -h index_h5.htm
-p + parent directory , ie: -p C:\evidence\case_no or
-p + . current directory of -p C:\evidence\case_no\report 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 (c:\top_level\target_etc...) 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 because it creates URL of relative pointers. TEST TEST TEST.
The default output htm file without the use of the -hH options is an index.htm in the current directory.
-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.