testfile %1 arc zip txt gif lzh sit 
if errorlevel == 7 goto unknown
if errorlevel == 6 goto end
if errorlevel == 5 goto lzh
if errorlevel == 4 goto end
if errorlevel == 3 goto end
if errorlevel == 2 goto zip
if errorlevel == 1 goto arc
goto end

:arc
del o:\scan\*.* < enter
pkxarc %1 o:\scan
scan o: /d /nomem > pcbfail.txt
if errorlevel == 1 goto warning
zap o:\scan\*.* < enter 
pkxarc -t %1 > pcbfail.txt
if errorlevel == 1 goto end
del pcbfail.txt
goto end

:zip
del o:\scan\*.* < enter
pkunzip %1 o:\scan
scan o: /d /nomem > pcbfail.txt
if errorlevel == 1 goto warning
del o:\scan\*.* < enter
pkunzip -t %1 > pcbfail.txt
if errorlevel == 1 goto end
del pcbfail.txt
goto end

:lzh
del o:\scan\*.* < enter
lharc e /w %1 o:\scan\
scan o: /d /nomem > pcbfail.txt
if errorlevel == 1 goto warning
del o:\scan\*.* < enter
lharc t /v %1 > pcbfail.txt
if errorlevel == 1 goto end
del pcbfail.txt
goto end


:unknown
echo ERROR: %1 archiver could not be identified! > pcbfail.txt
echo        %1 will be saved for the Sysop to inspect > pcbfail.txt
goto end

:warning
echo  A virus was found in file %1! > virwarn!
copy virwarn!+pcbfail.txt
copy virwarn! d:\hold
copy o:\scan\*.* o:\virus
del o:\scan\*.* < enter
:end
