home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
wp
/
pc-type2.zip
/
PCT3
/
cnb.bat
< prev
next >
Wrap
DOS Batch File
|
1989-06-27
|
2KB
|
62 lines
echo off
cls
if not .%1 == . goto CONT1
echo .
echo CNB needs to know the file to be converted.
echo Pass the filename as one parameter.
echo Pass the file extension (if there is one) as another parameter.
echo Do not include a period.
echo Example:
echo convert the file MYFILE.DOC to new PC-Type format with the command:
echo .
echo CNB myfile doc
echo .
echo The converted file will be in the same directory as MYFILE.PCT
echo The original file, MYFILE.DOC, will remain untouched.
echo .
echo Default margins and tabs assumed will be:
echo LEFT=5 RIGHT=75 no INDENT TABS at 10,20,30,40,50,60, and 70
echo .
echo To change one or more of these settings issue the following commands in DOS:
echo SET L=# # is column number for left margin
echo SET R=# # is column number for right margin
echo SET I=# # is column number for indent margin
echo SET E=# (Every #) e.g. E=10 would imply 10,20,....
echo .
goto EXIT
:CONT1
if exist %1.%2 goto CONT2
echo The file %1.%2 not found.
goto EXIT
:CONT2
if not exist %1.pct goto CONT3
echo The file %1.PCT already exists.
echo Conversion cancelled.
goto EXIT
:CONT3
cn
if errorlevel 1 goto ERROR1
copy __prev.pct /b + %1.%2
if errorlevel 1 goto ERROR2
copy __prev.pct %1.pct
if errorlevel 1 goto ERROR2
erase __prev.pct
cls
echo %1.%2 has been copied and converted to %1.PCT.
goto EXIT
:ERROR1
echo Problem performing conversion with CN.EXE.
goto EXIT
:ERROR2
erase __prev.pct
echo COPY command failed.
goto EXIT
:EXIT