home *** CD-ROM | disk | FTP | other *** search
- @echo off
- for %%f in (\a2zerr\*.*) do del %%f >nul
- if exist \a2zerr\nul rd \a2zerr >nul
-
- :FIRST
- if "%1" == "" goto ZIPTEST
- for %%f in (x X 1 2 3 4) do if "%%f" == "%1" goto SECOND
- goto ERROR
-
- :SECOND
- if "%2" == "" goto ZIPTEST
- for %%f in (1 2 3 4) do if "%%f" == "%2" goto ZIPTEST
- goto ERROR
-
- :ZIPTEST
- md any2zip
- if exist *.zip goto ZIPTEMP
-
- :START
- set ARCTYPE=
- for %%f in (ARC LZH PAK ZOO) do if exist *.%%f set ARCTYPE=%%f
- if "%ARCTYPE%" == "" goto END
- for %%f in (*.%ARCTYPE%) do call any2zip1 %%f %1 %2
- echo.
- echo ═══ All %ARCTYPE% files processed ═══
- echo.
- goto START
-
- :ZIPTEMP
- md ziptemp
-
- :ZIPTEMP1
- copy *.zip ziptemp >nul
- for %%g in (*.zip) do if exist ziptemp\%%g del %%g
- if exist *.zip goto ZIPTEMP1
- goto START
-
- :ZIPMOVE
- cd ziptemp
- for %%g in (*.zip) do if exist ..\%%g ren %%g *.z$p
- copy *.* .. >nul
- del *.z?p >nul
- cd ..
- rd ziptemp
- if exist *.?$? echo ═══ Old ZIP files renamed *.Z$P ═══
-
- :END
- if exist ziptemp\*.zip goto ZIPMOVE
- echo.
- echo ═══ Done with all files ═══
- echo.
- rd any2zip
- goto EXIT
-
- :ERROR
- echo.
- echo Usage: Any2zip [Text compression (1-4)] [Binary compression (1-4)]
- echo.
-
- :EXIT
- if exist \a2zerr\*.log echo ═══ Check ANY2ZIP.LOG for errors ═══
- echo.