home *** CD-ROM | disk | FTP | other *** search
- @echo off
- :START
- if "%1" == "" goto ERROR
- if "%arctype%" == "" goto ERROR
- cd temp.$$$
- if "%arctype%" == "?Q?" echo.
- if "%arctype%" == "?Q?" alusq11 ..\%1
- if errorlevel 1 goto BAD
- if "%arctype%" == "ARC" pkunpak ..\%1
- if errorlevel 1 goto BAD
- if "%arctype%" == "DWC" dwc e ..\%1
- if errorlevel 1 goto BAD
- if "%arctype%" == "LBR" lue220 ..\%1
- if errorlevel 1 goto BAD
- if "%arctype%" == "LZH" lharc e ..\%1
- if errorlevel 1 goto BAD
- if "%arctype%" == "MD" mdcd d ..\%1
- if errorlevel 1 goto BAD
- if "%arctype%" == "PAK" echo.
- if "%arctype%" == "PAK" pak e ..\%1
- if errorlevel 1 goto BAD
- if "%arctype%" == "Z$P" pkunzip ..\%1
- if errorlevel 1 goto BAD
- if "%arctype%" == "ZOO" zoo e ..\%1
- if errorlevel 1 goto BAD
- if not exist *.* goto BAD
- :DOZIP
- if exist *.zip ren *.zip *.z$p
- if exist *.?q? set arctype=?Q?
- if exist *.arc set arctype=ARC
- if exist *.dwc set arctype=DWC
- if exist *.lbr set arctype=LBR
- if exist *.lzh set arctype=LZH
- if exist *.md set arctype=MD
- if exist *.pak set arctype=PAK
- if exist *.z$p set arctype=Z$P
- if exist *.zoo set arctype=ZOO
- if exist *.%arctype% goto NEST
- del ..\%1
- if exist *.z!p ren *.z!p *.zip
- pkzip -a -ex -o ..\%1 *.*
- ren ..\%1 *.z!p
- goto DONE
- :NEST
- md temp.$$$
- for %%g in (*.%arctype%) do call CVT-ZIP! %%g
- rd temp.$$$
- goto DOZIP
- :ERROR
- echo.
- echo ERROR! CVT-ZIP! is not a stand alone application.
- echo.
- echo CVT-ZIP is the correct file to use.
- echo.
- echo.
- goto END
- :BAD
- echo.
- echo ERROR! %1 has some type of error.
- echo.
- echo Now moving %1 to the BAD.$$$ subdirectory.
- echo.
- echo.
- if not exist \bad.$$$\nul md \bad.$$$
- copy ..\%1 \bad.$$$ > nul
- del ..\%1
- :DONE
- echo y | del *.* > nul
- cd ..
- :END
- exit