home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / australi / scrcap11.lzh / SNR-RUN.BAT < prev    next >
DOS Batch File  |  1990-09-11  |  4KB  |  142 lines

  1. ECHO OFF
  2. CLS
  3. ECHO SNR-RUN.BAT creates from your named file, a new file named "FIL.TxT",
  4. ECHO ~~~~~~~~~~~ by replacing strings, as per the menu OPTions listed below.
  5. REM
  6. REM  Program files called: ANSWER.COM   (pd)
  7. REM                        SNR.EXE      (by T.Lundin USA).
  8. REM  Other files called:   *.CNV        (by J.Orlay Syd-PCUG)
  9. REM  Documentation:        SNR-RUN.DOC  (by J.Orlay Syd-PCUG)   read it ! 
  10. REM
  11.     :CHECKING
  12. REM  ~~~~~~~~
  13. REM  SNR-RUN.BAT now checks for presence of called files in current directory
  14.            IF NOT EXIST ANSWER.COM    GOTO ABORT1
  15.            IF NOT EXIST SNR.EXE       GOTO ABORT2
  16.            IF NOT EXIST *.CNV         GOTO ABORT3
  17. ECHO.
  18.     :FILE
  19. REM ~~~~~
  20. ECHO Please Enter the location and name of your file to be processed
  21. ECHO              for example    C:\MYSUBDIR\JUNKFILE.YYY
  22. ANSWER
  23.           IF NOT EXIST %ANSWER%       GOTO ABORT4
  24. SET RAWTEXT=%ANSWER%
  25. COPY %RAWTEXT% FIL > NUL
  26. REM
  27.     :OPTIONS
  28. REM  ~~~~~~~
  29. ECHO.
  30. ECHO.
  31. ECHO OPT EFFECT :  (for details see SNR-RUN.DOC)       FURTHER EDITING, under :
  32. ECHO ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~
  33. ECHO  0  Quit SNR-RUN.BAT to DOS         
  34. ECHO  1  Replace lone  Cr-s, Lf-s  with  CrLf-pairs    Any EXT ASCII editor
  35. ECHO  2  Delete  "More [Y,n,=]? #" (# was response)    Any EXT ASCII editor
  36. ECHO  3  Replace E(xt)G(raph)C(har) with EscEGChex1C   WordStar non-doc
  37. ECHO  4  Combine OPTs 1+2                              Any EXT ASCII editor
  38. ECHO  5  Delete  imbedded ^Z-s                         Any EXT ASCII editor
  39. ECHO  6  Delete  Esc chars                             Any EXT ASCII editor
  40. ECHO  7  Replace Esc chars with marker string "*ESC*"  Any EXT ASCII editor
  41. ECHO  ----------  Please enter the OPTion label of your choice  -----------
  42. ANSWER
  43. SET OPT=%ANSWER%
  44. ECHO Your Choice was %OPT%      PLEASE BE PATIENT:  this may be a long process
  45. IF %OPT%==0 GOTO END
  46. GOTO PROCESS%OPT%
  47. REM
  48.     :PROCESS1
  49. REM ~~~~~~~~~
  50. SNR  FIL  T%OPT%T  CL2CRLF.CNV > NUL
  51. SET  L=%L%%OPT%,
  52. GOTO DONE
  53. REM
  54.     :PROCESS2
  55. REM ~~~~~~~~~
  56. SNR  FIL  T%OPT%T  MOREDEL.CNV > NUL
  57. SET  L=%L%%OPT%,
  58. GOTO DONE
  59. REM
  60.     :PROCESS3
  61. REM ~~~~~~~~~
  62. SNR  FIL  T%OPT%T  EGC2WS.CNV  > NUL
  63. SET  L=%L%%OPT%,
  64. GOTO DONE
  65. REM
  66.     :PROCESS4
  67. REM ~~~~~~~~~
  68. SNR  FIL  T%OPT%T  CLM-FIX.CNV > NUL
  69. SET  L=%L%%OPT%,
  70. GOTO DONE
  71. REM
  72.     :PROCESS5
  73. REM ~~~~~~~~~
  74. SNR  FIL  T%OPT%T  CTRLZDEL.CNV > NUL
  75. SET  L=%L%%OPT%,
  76. GOTO DONE
  77. REM
  78.     :PROCESS6
  79. REM ~~~~~~~~~
  80. SNR  FIL  T%OPT%T  ESCDEL.CNV > NUL
  81. SET  L=%L%%OPT%,
  82. GOTO DONE
  83. REM
  84.     :PROCESS7
  85. REM ~~~~~~~~~
  86. SNR  FIL  T%OPT%T  ESCMARK.CNV > NUL
  87. SET  L=%L%%OPT%,
  88. GOTO DONE
  89. REM
  90.     :DONE
  91. REM ~~~~~
  92. ECHO DONE: from %RAWTEXT%, under OPTion %OPT%, you now also have :
  93. ECHO       its processed version FIL.T%OPT%T on your current directory
  94. ECHO Sofar, in this run you have invoked OPTions %L%
  95. ECHO Do you wish to reprocess FIL.T%OPT%T ?    Please Enter  Y  or  N 
  96. ANSWER
  97.               IF %ANSWER%==Y    GOTO REPROCES
  98.               IF %ANSWER%==y    GOTO REPROCES
  99. GOTO END
  100. REM
  101.     :REPROCES
  102. REM ~~~~~~~~~
  103. SET PREVFIL=FIL.T%OPT%T
  104. COPY %PREVFIL% FIL > NUL
  105. GOTO OPTIONS
  106. REM
  107.     :ABORT1
  108. REM ~~~~~~~
  109. ECHO.
  110. ECHO Aborted because ANSWER.COM is not in the current directory.   Please fix!
  111. GOTO END
  112. REM
  113.     :ABORT2
  114. REM ~~~~~~~
  115. ECHO.
  116. ECHO Aborted because SNR.EXE is not in the current directory.      Please fix!
  117. GOTO END
  118. REM
  119.     :ABORT3
  120. REM ~~~~~~~
  121. ECHO.
  122. ECHO Aborted because *.CNV are not in the current directory.       Please fix!
  123. GOTO END
  124. REM
  125.     :ABORT4
  126. REM ~~~~~~~
  127. ECHO.
  128. ECHO        Aborted!
  129. ECHO        %ANSWER% does not exist !  
  130. ECHO        Please check your directories !
  131. GOTO END
  132. REM
  133.     :END
  134. REM ~~~~   This EndSection deletes FIL and the used environment variables :
  135. DEL FIL
  136. SET RAWTEXT=
  137. SET PREVFIL=
  138. SET OPT=
  139. SET ANSWER=
  140. SET L=
  141. REM oooooooooooooooo  THIS IS THE END OF THE PROGRAM  ooooooooooooooooooo
  142.