HTML Shrinker Pro offers some command line options. This means that you can use HTML Shrinker from a DOS box or automate certain task with HTML Shrinker Pro by using a script.
For example, if you start a DOS box, switch to the HTML Shrinker folder and type in
htmlshrinker.exe -?
a dialog with the following explanations will appear:
Syntax: htmlshrinker.exe [-r] [-x] [-a] [-f Path] [-g] [-b] [-d] [-c] [-i] [-o Path] [-s] Switches: -r restores the files (overrides shrinking). -s simulates shrinking without saving the shrunken files. Path Parameter(s): Can be paths to a folder or file. |
Examples
Here are some examples that will illustrate the use of the command line instructions.
1. To shrink your web site (which doesn't contain any relevant sub folders) located at c:\html\mywebsite\ and to backup the original files in the same folder enter:
htmlshrinker.exe c:\html\mywebsite\
2. To shrink your web site (including all sub folders) located at c:\html\mywebsite\ and to backup the original files in the same folder enter:
htmlshrinker.exe -a c:\html\mywebsite\
3. To shrink your web site (including all sub folders) located at c:\html\mywebsite\ with the shrinking options from an options file (Commercial Pro Version only) that you saved before and to backup the original files in the same folder enter:
htmlshrinker.exe -a -o c:\html\mywebsite.hso c:\html\mywebsite\
4. To restore your web site to its original state enter:
htmlshrinker.exe -r -a c:\html\mywebsite\
5. To shrink your two web sites (including all sub folders) located at c:\html\mywebsite\ and c:\html\mywebsite2\ enter:
htmlshrinker.exe -a c:\html\mywebsite\ c:\html\mywebsite2\
6. To shrink the file index.html of your web site enter:
htmlshrinker.exe c:\html\mywebsite\index.html
7. To restore the same file enter:
htmlshrinker.exe -r c:\html\mywebsite\index.html
8. To remove all backup files which are located in the same folder as your web site (after you inspected all files and found no problems) enter:
htmlshrinker.exe -x -a c:\html\mywebsite\
9. To shrink your web site (including all sub folders) and to backup the original files to c:\backup\mywebsite\ enter:
htmlshrinker.exe -a -f c:\backup\mywebsite\ c:\html\mywebsite\
10. To restore your web site with backups located at c:\backup\mywebsite\ enter:
htmlshrinker.exe -r -a -f c:\backup\mywebsite\ c:\html\mywebsite\
11. To shrink your web site (including all sub folders) while leaving the original files untouched and saving the shrunken files to c:\upload\mywebsite\ enter:
htmlshrinker.exe -a -f c:\upload\mywebsite\ -g c:\html\mywebsite\
12. If you want to see how much smaller your web site would become when using HTML Shrinker, but don't want to already shrink it, you can use the -s switch to simulate shrinking. E.g.
htmlshrinker.exe -a -s c:\html\mywebsite\