home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
WP
/
WSM13.ZIP
/
EXAMPLE.BAT
next >
Wrap
DOS Batch File
|
1992-12-21
|
2KB
|
72 lines
:: To use this batch file, make sure the file WORDSMRT.DOC
:: exists in the same directory as the batch file itself.
:: Then just type EXAMPLE at the DOS prompt, and the batch
:: file will do the rest.
@echo off
if not exist wordsmrt.doc goto NOFILE
if "%1" == "" goto NOPARM
if not exist xxxxxxx_._xx goto DOIT
cls
echo.
echo.
echo.
echo.
echo NOTE:
echo.
echo This batch file writes an output file called XXXXXXX_._XX.
echo.
echo It happens there is already a file by that name here. If
echo you don't want it to be over-written, at the "Press any key"
echo prompt, below, press Control-C or Control-Break to terminate
echo the batch file at once.
echo.
pause
:DOIT
WSM wordsmrt.doc -r %1 -w xxxxxxx_._xx -o
if errorlevel 4 echo WordSmart returned errorlevel 4.
if errorlevel 3 if not errorlevel 4 echo WSM.EXE - right margin "%1" - errorlevel 3.
if errorlevel 2 if not errorlevel 3 echo WSM.EXE - right margin "%1" - errorlevel 2.
if errorlevel 1 if not errorlevel 2 echo WSM.EXE - right margin "%1" - errorlevel 1.
if errorlevel 0 if not errorlevel 1 echo WSM.EXE - right margin "%1" - errorlevel 0.
goto END
:NOPARM
cls
echo.
echo.
echo EXAMPLE.BAT -- missing the required command-line parameter.
echo.
echo The purpose of this batch file is to show the effects of differing
echo WordSmart "right margin" commands.
echo.
echo The batch file requires a single parameter on the command
echo line -- the new column width. It should be a number - 10 or above.
echo.
echo Exception: If you want to see how WordSmart can remove all line-
echo endings within paragraphs (preserving the line boundaries between
echo paragraphs), use the parameter "0". Note: If you enter an
echo alphabetic parameter instead of a numeric one, WordSmart will
echo ignore it and proceed as if you'd used "0" for the parameter.
echo.
echo Like so: EXAMPLE 45 to reformat the text to column 45, or
echo.
echo EXAMPLE 0 to remove all line breaks within paragraphs.
echo.
echo.
goto END
:NOFILE
echo.
echo This batch file requires an input file called WORDSMRT.DOC.
echo But I can't locate it ...
echo.
:END