ECHO OFF
CLS
ECHO SNR-RUN.BAT creates from your named file, a new file named "FIL.TxT",
ECHO ~~~~~~~~~~~ by replacing strings, as per the menu OPTions listed below.
REM
REM  Program files called: ANSWER.COM   (pd)
REM                        SNR.EXE      (by T.Lundin USA).
REM  Other files called:   *.CNV        (by J.Orlay Syd-PCUG)
REM  Documentation:        SNR-RUN.DOC  (by J.Orlay Syd-PCUG)   read it ! 
REM
    :CHECKING
REM  ~~~~~~~~
REM  SNR-RUN.BAT now checks for presence of called files in current directory
           IF NOT EXIST ANSWER.COM    GOTO ABORT1
           IF NOT EXIST SNR.EXE       GOTO ABORT2
           IF NOT EXIST *.CNV         GOTO ABORT3
ECHO.
    :FILE
REM ~~~~~
ECHO Please Enter the location and name of your file to be processed
ECHO              for example    C:\MYSUBDIR\JUNKFILE.YYY
ANSWER
          IF NOT EXIST %ANSWER%       GOTO ABORT4
SET RAWTEXT=%ANSWER%
COPY %RAWTEXT% FIL > NUL
REM
    :OPTIONS
REM  ~~~~~~~
ECHO.
ECHO.
ECHO OPT EFFECT :  (for details see SNR-RUN.DOC)       FURTHER EDITING, under :
ECHO ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~
ECHO  0  Quit SNR-RUN.BAT to DOS         
ECHO  1  Replace lone  Cr-s, Lf-s  with  CrLf-pairs    Any EXT ASCII editor
ECHO  2  Delete  "More [Y,n,=]? #" (# was response)    Any EXT ASCII editor
ECHO  3  Replace E(xt)G(raph)C(har) with EscEGChex1C   WordStar non-doc
ECHO  4  Combine OPTs 1+2                              Any EXT ASCII editor
ECHO  5  Delete  imbedded ^Z-s                         Any EXT ASCII editor
ECHO  6  Delete  Esc chars                             Any EXT ASCII editor
ECHO  7  Replace Esc chars with marker string "*ESC*"  Any EXT ASCII editor
ECHO  ----------  Please enter the OPTion label of your choice  -----------
ANSWER
SET OPT=%ANSWER%
ECHO Your Choice was %OPT%      PLEASE BE PATIENT:  this may be a long process
IF %OPT%==0 GOTO END
GOTO PROCESS%OPT%
REM
    :PROCESS1
REM ~~~~~~~~~
SNR  FIL  T%OPT%T  CL2CRLF.CNV > NUL
SET  L=%L%%OPT%,
GOTO DONE
REM
    :PROCESS2
REM ~~~~~~~~~
SNR  FIL  T%OPT%T  MOREDEL.CNV > NUL
SET  L=%L%%OPT%,
GOTO DONE
REM
    :PROCESS3
REM ~~~~~~~~~
SNR  FIL  T%OPT%T  EGC2WS.CNV  > NUL
SET  L=%L%%OPT%,
GOTO DONE
REM
    :PROCESS4
REM ~~~~~~~~~
SNR  FIL  T%OPT%T  CLM-FIX.CNV > NUL
SET  L=%L%%OPT%,
GOTO DONE
REM
    :PROCESS5
REM ~~~~~~~~~
SNR  FIL  T%OPT%T  CTRLZDEL.CNV > NUL
SET  L=%L%%OPT%,
GOTO DONE
REM
    :PROCESS6
REM ~~~~~~~~~
SNR  FIL  T%OPT%T  ESCDEL.CNV > NUL
SET  L=%L%%OPT%,
GOTO DONE
REM
    :PROCESS7
REM ~~~~~~~~~
SNR  FIL  T%OPT%T  ESCMARK.CNV > NUL
SET  L=%L%%OPT%,
GOTO DONE
REM
    :DONE
REM ~~~~~
ECHO DONE: from %RAWTEXT%, under OPTion %OPT%, you now also have :
ECHO       its processed version FIL.T%OPT%T on your current directory
ECHO Sofar, in this run you have invoked OPTions %L%
ECHO Do you wish to reprocess FIL.T%OPT%T ?    Please Enter  Y  or  N 
ANSWER
              IF %ANSWER%==Y    GOTO REPROCES
              IF %ANSWER%==y    GOTO REPROCES
GOTO END
REM
    :REPROCES
REM ~~~~~~~~~
SET PREVFIL=FIL.T%OPT%T
COPY %PREVFIL% FIL > NUL
GOTO OPTIONS
REM
    :ABORT1
REM ~~~~~~~
ECHO.
ECHO Aborted because ANSWER.COM is not in the current directory.   Please fix!
GOTO END
REM
    :ABORT2
REM ~~~~~~~
ECHO.
ECHO Aborted because SNR.EXE is not in the current directory.      Please fix!
GOTO END
REM
    :ABORT3
REM ~~~~~~~
ECHO.
ECHO Aborted because *.CNV are not in the current directory.       Please fix!
GOTO END
REM
    :ABORT4
REM ~~~~~~~
ECHO.
ECHO        Aborted!
ECHO        %ANSWER% does not exist !  
ECHO        Please check your directories !
GOTO END
REM
    :END
REM ~~~~   This EndSection deletes FIL and the used environment variables :
DEL FIL
SET RAWTEXT=
SET PREVFIL=
SET OPT=
SET ANSWER=
SET L=
REM oooooooooooooooo  THIS IS THE END OF THE PROGRAM  ooooooooooooooooooo
