@echo off cls :: TinyWeb will create environment variables :: Assumes a directory structure :: \ (contains tinyweb.exe and tinyweb.bat) :: \root (must have an index file) :: \root\cgi-bin :: Change to current batch file location cd /D "%~dp0" :: Kill previous instances taskkill /F /IM tinyweb.exe >NUL 2>nul :: Remove log files del access_log >NUL 2>nul del agent_log >NUL 2>nul del referer_log >NUL 2>nul del error_log >NUL 2>nul :: Set tinyweb parameters set root=%~dp0 set port=88 set bind=127.0.0.1 set cgi-ext=.md set cgi-interp=%~dp0multimarkdown.exe set url="http:\\localhost:%port%" :: Launch server start "" "%~dp0tinyweb.exe" "%root%" %port% %bind% %cgi-ext% %cgi-interp% :: Start browser using shellexec http://www.naughter.com/shelexec.html start %~dp0shellexe.exe %url% :End exit