home *** CD-ROM | disk | FTP | other *** search
/ ZIP KIT / ZIP_KIT.iso / bat / arc2exe.bat next >
Encoding:
DOS Batch File  |  1994-01-12  |  1.2 KB  |  54 lines

  1. @ECHO OFF
  2. ECHO.
  3.  
  4. REM Test of option, and whether files are valid.
  5.  
  6. IF %1x==x GOTO Error
  7. IF NOT EXIST %1.ARC GOTO Not_there
  8. IF NOT %2x==x IF EXIST %2.EXE GOTO Already_there_2
  9. IF EXIST %1.EXE GOTO Already_there_1
  10.  
  11. REM Create_the_file
  12.  
  13. ECHO Create target file ...
  14. IF 2%x==x COPY /b PKSFX.PGM+%1.ARC 1%.EXE>NUL
  15. IF NOT 2%==x COPY /b PKSFX.PGM+1%.ARC 2%.EXE>NUL
  16. ECHO File created.
  17. GOTO end
  18.  
  19. REM Error messages
  20.  
  21. :Error
  22. ECHO ARC2EXE - Creates self-extracting archive
  23. ECHO from PKPAK archive.
  24. ECHO.
  25. ECHO Application:
  26. ECHO     ARC2EXE archive [Target archive]
  27. ECHO.
  28. ECHO  Tip:
  29. ECHO     The extensions must not be entered,
  30. ECHO     otherwise the program will not run correctly.
  31. ECHO.
  32. ECHO  Examples:
  33. ECHO     ARC2EXE TEST         - Creates the TEXT.EXE file from TEXT.ARC
  34. ECHO     ARC2EXE FIRST NEW    - Creates NEW.EXE from FIRST.ARC
  35. GOTO end
  36.  
  37. :Not_there
  38. ECHO Error!
  39. ECHO The file %1.ARC cannot be found, processing terminated.
  40. GOTO end
  41.  
  42. :Already_there_1
  43. ECHO Error!
  44. ECHO The target file %1.EXE is already present, processing terminated.
  45. GOTO end
  46.  
  47. :Already_there_2
  48. ECHO Error!
  49. ECHO The target file %2.EXE is already present, processing terminated.
  50.  
  51. :end
  52. ECHO.
  53.  
  54.