@echo off if %1!==-w! set _encsfx=W if not %1!==-w! set _encsfx= if %1!==-w! shift if %1!==-! shift if %2!==! goto usage lharc a t$pesfx0 %2 %3 %4 %5 %6 %7 %8 %9 if errorlevel 1 goto clean_error lharc s t$pesfx0 if exist t$pesfx0.lzh del t$pesfx0.lzh if not exist t$pesfx0.com goto notexist_sfx if not %_encsfx%!==W! comt t$pesfx0.com %1 if %_encsfx%!==W! comt -w -n %1.com t$pesfx0.com %1 del t$pesfx0.com goto end :clean_error if exist t$pesfx0.lzh del t$pesfx0.lzh echo Error making t$pesfx0.lzh. goto end :notexist_sfx if exist t$pesfx0.exe goto toobig echo Error making t$pesfx0.com. goto end :toobig del t$pesfx0.exe echo Sorry, but you have too much data to fit in a .COM file. goto end :usage echo ┌──────────────────────────────────────────────────────────┐ echo │ Usage: │ echo │ comtarc [-w] outname[.EXT] file1 [file2 ...] │ echo └──────────────────────────────────────────────────────────┘ if not %_encsfx%!==! set _encsfx= :end