home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #2 / RBBS_vol1_no2.iso / add2 / cvt_lzh1.zip / CVT-LZH!.BAT < prev    next >
DOS Batch File  |  1989-04-24  |  2KB  |  72 lines

  1. @echo off
  2. :START
  3.   if "%1" == "" goto ERROR
  4.   if "%arctype%" == "" goto ERROR
  5.   cd temp.$$$
  6.   if "%arctype%" == "?Q?" echo.
  7.   if "%arctype%" == "?Q?" alusq11 ..\%1
  8.   if errorlevel 1 goto BAD
  9.   if "%arctype%" == "ARC" pkunpak ..\%1
  10.   if errorlevel 1 goto BAD
  11.   if "%arctype%" == "DWC" dwc e ..\%1
  12.   if errorlevel 1 goto BAD
  13.   if "%arctype%" == "LBR" lue220 ..\%1
  14.   if errorlevel 1 goto BAD
  15.   if "%arctype%" == "L$H" lharc e ..\%1
  16.   if errorlevel 1 goto BAD
  17.   if "%arctype%" == "MD" mdcd d ..\%1
  18.   if errorlevel 1 goto BAD
  19.   if "%arctype%" == "PAK" echo.
  20.   if "%arctype%" == "PAK" pak e ..\%1
  21.   if errorlevel 1 goto BAD
  22.   if "%arctype%" == "ZIP" pkunzip ..\%1
  23.   if errorlevel 1 goto BAD
  24.   if "%arctype%" == "ZOO" zoo e ..\%1
  25.   if errorlevel 1 goto BAD
  26.   if not exist *.* goto BAD
  27. :DOLZH
  28.   if exist *.lzh ren *.lzh *.l$h
  29.   if exist *.?q? set arctype=?Q?
  30.   if exist *.arc set arctype=ARC
  31.   if exist *.dwc set arctype=DWC
  32.   if exist *.lbr set arctype=LBR
  33.   if exist *.l$h set arctype=L$H
  34.   if exist *.md set arctype=MD
  35.   if exist *.pak set arctype=PAK
  36.   if exist *.zip set arctype=ZIP
  37.   if exist *.zoo set arctype=ZOO
  38.   if exist *.%arctype% goto NEST
  39.   del ..\%1
  40.   if exist *.l!h ren *.l!h *.lzh
  41.   echo y | lharc a ..\%1 *.*
  42.   ren ..\%1 *.l!h
  43.   goto DONE
  44. :NEST
  45.   md temp.$$$
  46.   for %%g in (*.%arctype%) do call CVT-LZH! %%g
  47.   rd temp.$$$
  48.   goto DOLZH
  49. :ERROR
  50.   echo.
  51.   echo ERROR!   CVT-LZH! is not a stand alone application.
  52.   echo.
  53.   echo          CVT-LZH is the correct file to use.
  54.   echo.
  55.   echo.
  56.   goto END
  57. :BAD
  58.   echo.
  59.   echo ERROR!  %1 has some type of error.
  60.   echo.
  61.   echo         Now moving %1 to the BAD.$$$ subdirectory.
  62.   echo.
  63.   echo.
  64.   if not exist \bad.$$$\nul md \bad.$$$
  65.   copy ..\%1 \bad.$$$ > nul
  66.   del ..\%1
  67. :DONE
  68.   echo y | del *.* > nul
  69.   cd ..
  70. :END
  71.   exit
  72.