home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / wp / pc-type2.zip / PCT3 / cnb.bat < prev    next >
DOS Batch File  |  1989-06-27  |  2KB  |  62 lines

  1. echo off
  2. cls
  3.  
  4. if not .%1 == . goto CONT1
  5. echo .
  6. echo CNB needs to know the file to be converted.
  7. echo     Pass the filename as one parameter.
  8. echo     Pass the file extension (if there is one) as another parameter.
  9. echo     Do not include a period.
  10. echo Example:
  11. echo     convert the file MYFILE.DOC to new PC-Type format with the command:
  12. echo .
  13. echo        CNB myfile doc
  14. echo .
  15. echo     The converted file will be in the same directory as MYFILE.PCT
  16. echo     The original file, MYFILE.DOC, will remain untouched.
  17. echo .
  18. echo Default margins and tabs assumed will be:
  19. echo      LEFT=5    RIGHT=75   no INDENT    TABS at 10,20,30,40,50,60, and 70
  20. echo .
  21. echo To change one or more of these settings issue the following commands in DOS:
  22. echo SET L=#           # is column number for left   margin
  23. echo SET R=#           # is column number for right  margin
  24. echo SET I=#           # is column number for indent margin
  25. echo SET E=#           (Every #) e.g. E=10 would imply 10,20,....
  26. echo .
  27. goto EXIT
  28.  
  29. :CONT1
  30. if exist %1.%2 goto CONT2
  31. echo The file %1.%2 not found.
  32. goto EXIT
  33.  
  34. :CONT2
  35. if not exist %1.pct goto CONT3
  36. echo The file %1.PCT already exists.
  37. echo Conversion cancelled.
  38. goto EXIT
  39.  
  40. :CONT3
  41. cn
  42. if errorlevel 1 goto ERROR1
  43. copy __prev.pct /b + %1.%2
  44. if errorlevel 1 goto ERROR2
  45. copy __prev.pct %1.pct
  46. if errorlevel 1 goto ERROR2
  47. erase __prev.pct
  48. cls
  49. echo %1.%2 has been copied and converted to %1.PCT.
  50. goto EXIT
  51.  
  52. :ERROR1
  53. echo Problem performing conversion with CN.EXE.
  54. goto EXIT
  55.  
  56. :ERROR2
  57. erase __prev.pct
  58. echo COPY command failed.
  59. goto EXIT
  60.  
  61. :EXIT
  62.