@echo off
IF ""% 1 "==" "" "" "" goto useageif "% 1" == "% 1" == "?" goto useageif "% 1 ==" / h "goto useageif "% 1" == "/ h" goto useageif ""% 2 "==" "" goto defaultfileset filename =% 2GOTO BEGIN
: defaultfileset filename = index.html
: Beginif EXIST% FileName% Goto EXISTERRORSET TEMPFILE =% Temp% / ~ Dir.txtecho Creating File "% FileName%", please wait ... DIR / B / S% 1> TempFile% Echo ^ ^ < Head ^> ^