home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / dosutils / managsrc.arj / MANAGR40.ASI < prev    next >
Encoding:
Text File  |  1990-02-21  |  41.7 KB  |  2,354 lines

  1. rem MANAGR40.COM
  2.  
  3. rem This program requires approximately 130K.
  4.  
  5. rem consecutive to wait9:
  6.  
  7. rem initialize Esc key.  This is necessary because some parameters go directly 
  8. rem to a routine; if it wasn't initialized here, it would have to be re-
  9. rem initialized in every routine in which it was used.  CHR$(27) is the ASCII 
  10. rem code for the Esc key.
  11.  
  12. b$=chr$(27)
  13.  
  14. rem initialize Enter (Return) key.  Same reason as the Esc key initialization, 
  15. rem but applies mainly to the error routines.  CHR$(13) is the ASCII code for 
  16. rem the Enter (Return) key.
  17.  
  18. c$=chr$(13)
  19.  
  20. rem Again, for the error routines, initialize the Backspace key and space bar.
  21.  
  22. d$=chr$(8)
  23. e$=chr$(32)
  24. lf$=chr$(10)
  25. crlf$=c$+lf$
  26. rem a=csrline (this is reserved in the subroutine CURSOR:)
  27. rem b=pos(0) (also reserved in CURSOR: subroutine)
  28. rem c=b-1 (reserved in CURSOR: subroutine)
  29.  
  30. a$=command$
  31. if a$="/40" then menu40:
  32. if a$="/40 ?" then help40:
  33.  
  34. if a$="/40 d" then
  35. call "util1-40.com","/d"
  36. goto menu40:
  37. endif
  38.  
  39. if a$="/40 D" then
  40. call "util1-40.com","/d"
  41. goto menu40:
  42. endif
  43.  
  44. if a$="/40 m" then makedr40:
  45. if a$="/40 M" then makedr40:
  46. if a$="/40 n" then renfil40:
  47. if a$="/40 N" then renfil40:
  48. if a$="/40 g" then timedt40:
  49. if a$="/40 G" then timedt40:
  50.  
  51. if a$="/40 b" then
  52. gosub blankscr:
  53. goto menu40:
  54. endif
  55.  
  56. if a$="/40 B" then
  57. gosub blankscr:
  58. goto menu40:
  59. endif
  60.  
  61.  
  62. if a$=" /40 s" then
  63. call ("util1-80.com"," /s 40")
  64. goto menu40:
  65. endif
  66.  
  67. if a$=" /40 S" then
  68. call ("util1-80.com"," /s 40")
  69. goto menu40:
  70. endif
  71.  
  72. if a$="/40 l" then prfile40:
  73. if a$="/40 L" then prfile40:
  74. if a$="/40 e" then removedr:
  75. if a$="/40 r" then runoth40:
  76. if a$="/40 R" then runoth40:
  77. if a$="/40 co" then changeco:
  78. if a$="/40 o" then movefile:
  79.  
  80. rem If no parameters, begin from the beginning.
  81.  
  82. rem Set up and print intro screen.
  83. width 40
  84. print "          The Manager 2.68"
  85. print
  86. print
  87. print "            Matt Roberts"
  88. print "           5 Cedar St., # 8"
  89. print "      Montpelier, Vt 05602-3006"
  90. print "            (802)223-2553"
  91. print
  92. print
  93. print
  94. print
  95. print
  96. print "Press any key to continue. ";
  97. gosub continue:
  98.  
  99.  
  100. rem Here is the routine for generating 40-column width for visually impaired
  101. rem people.
  102. rem In order to make certain the screen writes are readable, the entire program 
  103. rem is essentially rewritten in this module.
  104.  
  105. menu40:
  106. width 40
  107. print "Your Options:"
  108. print
  109. print
  110. print "F1- View Your Files."
  111. print
  112. print "F2- Delete Files."
  113. print
  114. print "F3- Make a directory."
  115. print
  116. print "F4- Rename Files."
  117. print
  118. print "F5- Get the Time/Date."
  119. print
  120. print "F6- Shell to DOS."
  121. print
  122. print "F7- Blank Your Screen."
  123. print
  124. print "F8- Next menu."
  125. print
  126. print "Esc- Quit."
  127. print
  128. print
  129. print "Please press the key corresponding to"
  130. print "your choice. ";
  131.  
  132. wait12:
  133. gosub continue:
  134.  
  135. if a$=b$ then
  136. cls
  137. end
  138. endif
  139.  
  140. if extended=0 then wait12:
  141.  
  142. if a$=";" then
  143. call ("util1-80.com"," /s 40")
  144. goto menu40:
  145. endif
  146.  
  147. if a$="<" then
  148. call "util1-40.com","/d"
  149. goto menu40:
  150. endif
  151.  
  152. if a$="=" then makedr40:
  153. if a$=">" then renfil40:
  154. if a$="?" then timedt40:
  155. if a$="@" then shell40:
  156.  
  157. if a$="A" then
  158. gosub blankscr:
  159. endif
  160.  
  161. if a$="B" then 2dmenu40:
  162. goto wait12:
  163.  
  164. 2dmenu40:
  165. width 40
  166. print "Here are more options:"
  167. print
  168. print
  169. print "F1- Change to 80-column mode."
  170. print
  171. print "F2- Print file."
  172. print
  173. print "F3- See a list of parameters you can"
  174. print "use from DOS."
  175. print
  176. print "F4- Work with CONFIG.SYS."
  177. print
  178. print "F5- Work with AUTOEXEC.BAT."
  179. print
  180. print "N- Next Menu."
  181. print
  182. print "P- Previous Menu."
  183. print
  184. print "Esc- Quit."
  185. print
  186. print "Please press the key corresponding to"
  187. print "your choice. ";
  188.  
  189. wait58:
  190. gosub continue:
  191. if a$="n" then 3rdmenu:
  192. if a$="N" then 3rdmenu:
  193. if a$="p" then menu40:
  194. if a$="P" then menu40:
  195.  
  196. if a$=b$ then
  197. cls
  198. end
  199. endif
  200.  
  201. if extended=0 then wait58:
  202.  
  203. if a$=";" then
  204. width 80
  205. end
  206. endif
  207.  
  208. if a$="<" then prfile40:
  209. if a$="=" then help40:
  210. if a$=">" then changeco:
  211. if a$="?" then chngauto:
  212. goto wait58:
  213.  
  214. 3rdmenu:
  215. width 40
  216. print "Here are more options:"
  217. print
  218. print
  219. print "F1- Run Other Programs."
  220. print
  221. print "F2- Remove a Directory."
  222. print
  223. print "F3- Copy a File."
  224. print
  225. print "F4- Move a File."
  226. print
  227. print "F5- Use the Crappy Calculator."
  228. print
  229. print "F6- See a list of ASCII Codes."
  230. print
  231. print "N- Next Menu."
  232. print
  233. print "P- Previous Menu."
  234. print
  235. print "Esc- Quit and Return to DOS."
  236. print
  237. print
  238. print "Please press the key corresponding to"
  239. print "your choice. ";
  240.  
  241. wait:
  242. gosub continue:
  243.  
  244. if a$=b$ then
  245. cls
  246. end
  247. endif
  248.  
  249. if a$="n" then 4thmenu:
  250. if a$="N" then 4thmenu:
  251. if a$="p" then 2dmenu40:
  252. if a$="P" then 2dmenu40:
  253.  
  254. if extended=0 then wait:
  255.  
  256. if a$=";" then runoth40:
  257. if a$="<" then removedr:
  258. if a$="=" then copyfile:
  259. if a$=">" then movefile:
  260.  
  261. if a$="?" then
  262. call "util1-40.com"," /cr"
  263. goto 3rdmenu:
  264. endif
  265.  
  266. if a$="@" then
  267. call "util1-40.com"," /a"
  268. goto 3rdmenu:
  269. endif
  270.  
  271. goto wait:
  272.  
  273. 4thmenu:
  274. cls
  275. print "More options:"
  276. print
  277. print
  278. print "F1- Change Your Default Directory."
  279. print
  280. print "F2- Install a DOS Parameter."
  281. print
  282. print "P- Previous menu."
  283. print
  284. print "Esc- Quit and return to DOS."
  285. print
  286. print
  287. print "Please press the key corresponding to"
  288. print "your choice. ";
  289.  
  290. wait9:
  291. gosub continue:
  292.  
  293. if a$=b$ then
  294. end
  295. endif
  296.  
  297. if a$="p" then 3rdmenu:
  298. if a$="P" then 3rdmenu:
  299.  
  300. if extended=0 then wait9:
  301.  
  302. if a$=";" then
  303. call "util1-40.com"," /c"
  304. goto 4thmenu:
  305. endif
  306.  
  307. if a$="<" then
  308. call "util1-40.com"," /i"
  309. goto 4thmenu:
  310. endif
  311.  
  312. goto wait9:
  313.  
  314.  
  315. rem Here is the routine for making a directory in 40-column mode.
  316.  
  317. makedr40:
  318. width 40
  319. print "Make a Directory"
  320. print
  321. print
  322. spaces$=space$(30)
  323. print spaces$;
  324. color 0,7
  325. print "Esc=Quit"
  326. color 7,0
  327. print "Directory name (include drive and"
  328. print "path)? ";
  329. gosub retypf40:
  330. directory$=file$
  331. realdir$=ucase$(directory$)
  332.  
  333. remake40:
  334. mkdir directory$
  335. if error=3 then nopthm40:
  336. if error=5 then ilglmd40:
  337. print ""
  338. print ""
  339. print "You have created directory: "
  340. print
  341. print realdir$
  342. directory$=""
  343. print
  344. print
  345. print "Would you like to make another"
  346. print "directory? (y/n) ";
  347.  
  348. wait16:
  349. gosub continue:
  350. if a$="y" then makedr40:
  351. if a$="Y" then makedr40:
  352. if a$="n" then menu40:
  353. if a$="N" then menu40:
  354. goto wait16:
  355.  
  356. rem This is the end of the routine for making directories in 40-column mode.
  357.  
  358.  
  359.  
  360. rem Here is the routine for renaming files in 40-column mode.
  361.  
  362. renfil40:
  363. width 40
  364. print "Rename Files."
  365. print
  366. print
  367. spaces$=space$(30)
  368. print spaces$;
  369. color 0,7
  370. print "Esc=Quit"
  371. color 7,0
  372. print "Name of file to change (include drive"
  373. print "and path)? ";
  374. gosub retypf40:
  375. file1$=file$
  376. realfil1$=ucase$(file1$)
  377.  
  378. print ""
  379. print ""
  380. print "New name for ";
  381. print file1$;
  382. print "? "
  383. print
  384. file$=""
  385. gosub retypf40:
  386. file2$=file$
  387. realfil2$=ucase$(file2$)
  388.  
  389. refile40:
  390. name file1$ as file2$
  391. if error=2 then noflrf40:
  392. if error=3 then nopthr40:
  393. if error=5 then ilglrf40:
  394. if error=17 then difdrr40:
  395. print ""
  396. print ""
  397. print realfil1$;
  398. print " has been renamed"
  399. print realfil2$
  400. file1$=""
  401. file2$=""
  402. print
  403. print "Rename another? (y/n) ";
  404.  
  405. wait17:
  406. gosub continue:
  407. if a$="y" then renfil40:
  408. if a$="Y" then renfil40:
  409. if a$="n" then menu40:
  410. if a$="N" then menu40:
  411. goto wait17:
  412.  
  413. rem This is the end of the routine for renaming files in 40-column mode.
  414.  
  415.  
  416.  
  417. rem Here is the routine for getting the time/date in 40-column mode.
  418.  
  419. timedt40:
  420.  
  421. width 40
  422. print "Here are your options:"
  423. print
  424. print
  425. print "F1- Get the time."
  426. print
  427. print "F2- Get the date."
  428. print
  429. print "F3- Get both."
  430. print
  431. print "Esc- Return to the Main Options Menu."
  432. print
  433. print
  434. print "Please press the key corresponding to"
  435. print "your choice. ";
  436.  
  437. wait44:
  438. gosub continue:
  439. if a$=b$ then menu40:
  440. if extended=0 then wait44:
  441.  
  442. if a$=";" then gettim40:
  443. if a$="<" then getdat40:
  444. if a$="=" then getbth40:
  445. goto wait44:
  446.  
  447. gettim40:
  448. width 40
  449. print "Get the Time"
  450. print
  451. print
  452. print "In order to get the correct date, the"
  453. print "computer's internal clock must be set"
  454. print "correctly."
  455. print
  456. print
  457.  
  458. a$=time$
  459. f$=mid$(a$,1,2)
  460. d=val(f$)
  461.  
  462. if d>12 then
  463. d=d-12
  464. h$=" PM"
  465. else
  466. h$=" AM"
  467. endif
  468.  
  469. if d=12 then
  470. h$=" PM"
  471. endif
  472.  
  473. e=d
  474. g$=str$(e)
  475. i$=mid$(a$,3,6)
  476. j$=g$+i$
  477. k$=ltrim$(j$)
  478. print "The time is now: ";
  479. print k$;
  480. print h$
  481. print
  482. print
  483. print "Press any key to continue. ";
  484. gosub continue:
  485. goto timedt40:
  486.  
  487. getdat40:
  488.  
  489. width 40
  490. print "Get the Date"
  491. print
  492. print
  493. print "In order for this feature to work"
  494. print "properly, the date in your computer"
  495. print "must be set properly.  If it isn't,"
  496. print "you may get a weird date."
  497. print
  498. print
  499. print
  500. print
  501. print
  502. a$=date$
  503. print "Today's date is ";
  504. print a$
  505. print
  506. print
  507. print "Press any key to continue. ";
  508. gosub continue:
  509. goto timedt40:
  510.  
  511. getbth40:
  512. width 40
  513. print "Get Both"
  514. print
  515. print
  516. print "In order to get the correct time and"
  517. print "date, the clock and calendar have to"
  518. print "be set properly."
  519. print
  520. print
  521. a$=time$
  522. f$=mid$(a$,1,2)
  523. d=val(f$)
  524.  
  525. if d>12 then
  526. d=d-12
  527. h$=" PM"
  528. else
  529. h$=" AM"
  530. endif
  531.  
  532. if d=12 then
  533. h$=" PM"
  534. endif
  535.  
  536. e=d
  537. g$=str$(e)
  538. i$=mid$(a$,3,6)
  539. j$=g$+i$
  540. k$=ltrim$(j$)
  541. print "The time is now: ";
  542. print k$;
  543. print h$
  544. print
  545. print
  546.  
  547. a$=date$
  548. print "Today's date is: ";
  549. print a$
  550. print
  551. print
  552. print "Press any key to continue. ";
  553. gosub continue:
  554. goto timedt40:
  555.  
  556. rem This is the end of the routine for getting the time and/or date (40-
  557. rem columns).
  558.  
  559.  
  560.  
  561. rem Here is the routine for shelling to DOS in 40-column mode.
  562.  
  563. shell40:
  564. width 40
  565. print "Shell to DOS"
  566. print
  567. print
  568. print "On which drive is your COMMAND.COM?"
  569. print "(Don't type the colon) ";
  570.  
  571. gosub continue:
  572. path$=a$+":\command.com"
  573. width 40
  574. print "Use the DOS command EXIT to return to"
  575. print "The Manager."
  576. call path$,""
  577. if error=255 then nocall40:
  578. goto menu40:
  579.  
  580. rem This is the end of the routine for shelling to DOS in 40-column mode.
  581.  
  582.  
  583. rem Here are the help screens for 40-column mode.
  584.  
  585. help40:
  586. width 40
  587. print "You can use parameters with The"
  588. print "Manager; they may save you time."
  589. print
  590. print
  591. print "Typing MANAGER /40 will put you in"
  592. print "40-column mode."
  593. print
  594. print "Typing MANAGER /40 ? will give you"
  595. print "these help screens."
  596. print
  597. print "Typing MANAGER /40 D will let you"
  598. print "delete files."
  599. print
  600. print "Typing MANAGER /40 M will let you"
  601. print "make a directory."
  602. print
  603. print "Typing MANAGER /40 N will let you"
  604. print "rename files."
  605. print
  606. print
  607. print "Press any key to continue. ";
  608. gosub continue:
  609. width 40
  610. print "Typing MANAGER /40 G will let you see"
  611. print "the time and/or date."
  612. print
  613. print "Typing MANAGER /40 B will let you"
  614. print "blank your screen."
  615. print
  616. print "Typing MANAGER /40 S will let you"
  617. print "a list of disk files."
  618. print
  619. print "Typing MANAGER /40 L will let you"
  620. print "print a file on the lineprinter."
  621. print
  622. print "Typing MANAGER /40 r will let you"
  623. print "run other programs."
  624. print
  625. print
  626. print "Either upper or lower case is fine."
  627. print
  628. print
  629. print "Do you want to ";
  630. color 0,15
  631. print "C";
  632. color 7,0
  633. print "ontinue with the File"
  634. print "Manager or return to ";
  635. color 0,15
  636. print "D";
  637. color 7,0
  638. print "OS?"
  639. print
  640. print
  641. print "Please press the key corresponding to"
  642. print "your choice. ";
  643.  
  644. wait43:
  645. gosub continue:
  646. if a$="c" then menu40:
  647. if a$="C" then menu40:
  648.  
  649. if a$="d" then
  650. cls
  651. end
  652. endif
  653.  
  654. if a$="D" then
  655. cls
  656. end
  657. endif
  658.  
  659. goto wait43:
  660.  
  661.  
  662. rem Here is the routine for printing a file in 40-column mode.
  663.  
  664. prfile40:
  665.  
  666. width 40
  667. print "Print a File"
  668. print
  669. print
  670. spaces$=space$(30)
  671. print spaces$;
  672. color 0,7
  673. print "Esc=Quit"
  674. color 7,0
  675. print "Please type the name of the file you"
  676. print "want to print."
  677. print
  678. print "Include the drive and path."
  679. print
  680. gosub retypf40:
  681. realfile$=ucase$(file$)
  682.  
  683. doprfl40:
  684. f$=chr$(12)
  685. open "i",1,file$
  686.  
  687. if error=2 then nofilp40:
  688. if error=3 then nopthp40:
  689.  
  690. headng40:
  691. width 40
  692. print "Printing...";
  693. realfile$=ucase$(file$)
  694. color 0,7
  695. print realfile$
  696. color 7,0
  697. print
  698. print
  699. print "Press space bar to pause printing, or"
  700. print "Esc to quit."
  701. print
  702. print
  703.  
  704. prnmor40:
  705. input# 1, line$ crlf
  706.  
  707. if error=96 then
  708. lprint line$
  709. goto blnkln40:
  710. endif
  711.  
  712. contln40:
  713. lprint line$
  714.  
  715. a$=inkey$
  716.  
  717. if a$=b$ then
  718. print "Printing has been terminated.  The"
  719. print "printer may still have data in its"
  720. print "buffer.  If so, it will continue"
  721. print "printing until the buffer is empty."
  722. print
  723. lprint f$
  724. close 1
  725. file$=""
  726. print
  727. print
  728. print "Print another file? ";
  729. goto wait14:
  730. endif
  731.  
  732. if a$=e$ then
  733. print "Press any key to resume printing. ";
  734. gosub continue:
  735. a$=""
  736. goto headng40:
  737. endif
  738.  
  739. if error=99 then eofp40:
  740. goto prnmor40:
  741.  
  742. blnkln40:
  743. input# 1, line$ crlf
  744. if line$="" then prnmor40: else contln40:
  745.  
  746. eofp40:
  747. lprint line$
  748. print "Finished."
  749. close 1
  750. lprint f$
  751. file$=""
  752. print
  753. print
  754. print "Print another file? (y/n) ";
  755.  
  756. wait14:
  757. gosub continue:
  758. if a$="y" then prfile40:
  759. if a$="Y" then prfile40:
  760. if a$="n" then 2dmenu40:
  761. if a$="N" then 2dmenu40:
  762. goto wait14:
  763.  
  764. rem This is the end of the routine for printing a file in 40-column mode.
  765.  
  766.  
  767. rem Here is the routine for running other progams from 40-column mode.
  768.  
  769. runoth40:
  770. width 40
  771. spaces$=space$(30)
  772. print spaces$;
  773. color 0,7
  774. print "Esc=Quit"
  775. color 7,0
  776. print
  777. print "Please type the full name of the"
  778. print "program you want to run (for example,"
  779. print "MYPROGRM.COM).  Include the drive and"
  780. print "path."
  781. gosub retypf40:
  782. program$=file$
  783. file$=""
  784. print ""
  785. print "You can specify an argument to your"
  786. print "program, but it must be one phrase (no"
  787. print "spaces).  Do you want to specify an"
  788. print "argument (y/n) ";
  789.  
  790. wait24:
  791. gosub continue:
  792. if a$="y" then getarg40:
  793. if a$="Y" then getarg40:
  794.  
  795. if a$="n" then
  796. argument$=""
  797. goto dorun40:
  798. endif
  799.  
  800. if a$="N" then
  801. argument$=""
  802. goto dorun40:
  803. endif
  804.  
  805. goto wait24:
  806.  
  807. getarg40:
  808. width 40
  809. spaces$=space$(30)
  810. print spaces$;
  811. color 0,7
  812. print "Esc=Quit"
  813. color 7,0
  814. print
  815. print "Please type the argument you'd like to"
  816. print "use.  It can only be one phrase and"
  817. print "cannot contain any spaces. ";
  818. file$=""
  819. gosub retypf40:
  820. argument$=file$
  821. file$=""
  822.  
  823. dorun40:
  824. argument$=e$+argument$
  825. call program$,argument$
  826. if error=255 then cantrn40:
  827. print
  828. print
  829. print "Press any key to return to The"
  830. print "Manager. ";
  831. gosub continue:
  832. program$=""
  833. argument$=""
  834. width 40
  835. print "Would you like to run another"
  836. print "program (y/n)? ";
  837.  
  838. wait27:
  839. gosub continue:
  840. if a$="y" then runoth40:
  841. if a$="Y" then runoth40:
  842. if a$="n" then 2dmenu40:
  843. if a$="N" then 2dmenu40:
  844. goto wait27:
  845.  
  846. rem This is the end of the routine for running other programs in 40-column mod
  847.  
  848.  
  849. rem Here is the routine for removing directories in 40-column mode.
  850.  
  851. removedr:
  852. width 40
  853. print "Remove Directories"
  854. print
  855. print
  856. spaces$=space$(30)
  857. print spaces$;
  858. color 0,7
  859. print "Esc=Quit"
  860. color 7,0
  861. print
  862. print "Before you can remove a directory, you"
  863. print "must remove all files in that dir-"
  864. print "ectory, and in its subdirectories."
  865. print "You must then remove all subdirector-"
  866. print "ies."
  867. print
  868. print
  869.  
  870. removagn:
  871. print "Please type the name of the directory"
  872. print "you'd like to remove.  Include the"
  873. print "drive and path. ";
  874. gosub retypf40:
  875. directory$=file$
  876.  
  877. reremove:
  878. rmdir directory$
  879. if error=3 then nopathrm:
  880. if error=5 then accessde:
  881. if error=6 then cantrmdi:
  882. if error=16 then cantrmdi:
  883. realfile$=ucase$(directory$)
  884. print ""
  885. print ""
  886. print realfile$;
  887. print "has been removed."
  888. print ""
  889. print ""
  890. print "Would you like to remove another dir-"
  891. print "ectory? ";
  892.  
  893. wait40:
  894. gosub continue:
  895. if a$="y" then removagn:
  896. if a$="Y" then removagn:
  897. if a$="n" then 2dmenu40:
  898. if a$="N" then 2dmenu40:
  899. goto wait40:
  900.  
  901. rem This is the end of the routine for removing directories.
  902.  
  903.  
  904. rem Here is the routine for copying text files.
  905.  
  906. copyfile:
  907. width 40
  908. print "Copy File"
  909. print
  910. print
  911. print "*****PLEASE NOTE***** Only text files"
  912. print "will copy properly using this method."
  913. print "Files with an extension of .EXE, .COM,"
  914. print "or which contain other special char-"
  915. print "acters will usually not copy properly."
  916. print
  917. print "Press any key to continue. ";
  918. gosub continue:
  919.  
  920. copymore:
  921. cls
  922. spaces$=space$(30)
  923. print spaces$;
  924. color 0,7
  925. print "Esc=Quit"
  926. color 7,0
  927. print
  928. print "File to copy (include drive and"
  929. print "path)? ";
  930. gosub retypf40:
  931. file1$=file$
  932. file$=""
  933. realfil1$=ucase$(file1$)
  934.  
  935. print ""
  936. print "Destination (include drive and"
  937. print "path)? ";
  938. gosub retypf40:
  939. file2$=file$
  940. realfil2$=ucase$(file2$)
  941. reinput:
  942. open "i",1,file1$
  943. rem if error=2 then nofilecf:
  944.  
  945. rem if error=3 then
  946. rem labelnum=1
  947. rem goto nopathcf:
  948. rem endif
  949.  
  950. open "o",2,file2$
  951. reoutput:
  952.  
  953. rem if error=3 then
  954. rem labelnum=2
  955. rem goto nopathcf:
  956. rem endif
  957.  
  958. wait1:
  959. input # 1, line$ crlf
  960. if error=99 then copydone:
  961.  
  962. if error=96 then
  963. print # 2, line$ nonull
  964. input # 1, line$ crlf
  965. if line$="" then
  966. print # 2, crlf$ nonull
  967. goto wait1:
  968. endif
  969. endif
  970.  
  971. print # 2, line$ nonull
  972. print # 2, crlf$ nonull
  973. goto wait1:
  974.  
  975. copydone:
  976. close 1
  977. close 2
  978. print ""
  979. print ""
  980. print realfil1$;
  981. print " has been copied to ";
  982. print realfil2$;
  983. print "."
  984. print
  985. print "Copy another? ";
  986.  
  987. wait2:
  988. gosub continue:
  989. if a$="y" then copymore:
  990. if a$="Y" then copymore:
  991. if a$="n" then 3rdmenu:
  992. if a$="N" then 3rdmenu:
  993. goto wait2:
  994.  
  995. rem This is the end of the routine for copying a text file.
  996.  
  997.  
  998. rem Here is the routine for moving a file.
  999.  
  1000. movefile:
  1001. width 40
  1002. print "Move File"
  1003. print
  1004. print
  1005. print "*****PLEASE NOTE***** Only text files"
  1006. print "will move properly using this method."
  1007. print "Files with an extension of .EXE, .COM,"
  1008. print "or which contain other special charac-"
  1009. print "ters will usually not move properly."
  1010. print "In addition, this option is destruct-"
  1011. print "ive, destroying the original file."
  1012. print "You are urged to make backups before"
  1013. print "attempting any procedure which can"
  1014. print "change a file."
  1015. print
  1016. print
  1017. print "Press Esc to quit, or any other key to"
  1018. print "continue. ";
  1019. gosub continue:
  1020. if a$=b$ then 3rdmenu:
  1021.  
  1022. movemore:
  1023. cls
  1024. spaces$=space$(30)
  1025. print spaces$;
  1026. color 0,7
  1027. print "Esc=quit"
  1028. color 7,0
  1029. print
  1030. print "File to move (include drive and path)?"
  1031. gosub retypf40:
  1032. file1$=file$
  1033. realfil1$=ucase$(file1$)
  1034. file$=""
  1035.  
  1036. print ""
  1037. print "Destination (include drive and path)?"
  1038. gosub retypf40:
  1039. file2$=file$
  1040. realfil2$=ucase$(file2$)
  1041. file$=""
  1042.  
  1043. reinputm:
  1044. open "i",1,file1$
  1045. if error=2 then nofilemf:
  1046.  
  1047. if error=3 then
  1048. io=1
  1049. goto nopathmf:
  1050. endif
  1051.  
  1052. reoutpum:
  1053. open "o",2,file2$
  1054.  
  1055. if error=3 then
  1056. io=1
  1057. goto nopathmf:
  1058. endif
  1059.  
  1060. if error=5 then noopenmf:
  1061.  
  1062. wait3:
  1063. input # 1, line$ crlf
  1064. if error=99 then movedone:
  1065.  
  1066. if error=96 then
  1067. print # 2, line$ nonull
  1068. input # 1, line$ crlf
  1069. if line$="" then
  1070. print # 2, crlf$ nonull
  1071. goto wait3:
  1072. endif
  1073. endif
  1074.  
  1075. print # 2, line$ nonull
  1076. print # 2, crlf$ nonull
  1077. goto wait3:
  1078.  
  1079. movedone:
  1080. close 1
  1081. close 2
  1082. kill file1$
  1083. print ""
  1084. print ""
  1085. print realfil1$;
  1086. print " has been moved to ";
  1087. print realfil2$;
  1088. print "."
  1089. print
  1090. print "Move another? ";
  1091.  
  1092. wait4:
  1093. gosub continue:
  1094. if a$="y" then movemore:
  1095. if a$="Y" then movemore:
  1096. if a$="n" then 3rdmenu:
  1097. if a$="N" then 3rdmenu:
  1098. goto wait4:
  1099.  
  1100. rem This is the end of the routine for moving a file.
  1101.  
  1102.  
  1103. rem HERE IS THE ROUTINE FOR WORKING WITH THE CONFIG.SYS FILE.
  1104.  
  1105. changeco:
  1106. width 40
  1107. print "View or Change Your CONFIG.SYS File"
  1108. print
  1109. print
  1110. print "On which drive is your CONFIG.SYS"
  1111. print "file";
  1112. input drive$
  1113.  
  1114. redrive:
  1115. drive$=drive$+"\"
  1116.  
  1117. if drive$="a:\" then
  1118. file1$="a:\config.sys"
  1119. endif
  1120.  
  1121. if drive$="A:\" then
  1122. file1$="a:\config.sys"
  1123. endif
  1124.  
  1125. if drive$="b:\" then
  1126. file1$="b:\config.sys"
  1127. endif
  1128.  
  1129. if drive$="B:\" then
  1130. file1$="b:\config.sys"
  1131. endif
  1132.  
  1133. if drive$="c:\" then
  1134. file1$="c:\config.sys"
  1135. endif
  1136.  
  1137. if drive$="C:\" then
  1138. file1$="c:\config.sys"
  1139. endif
  1140.  
  1141. if drive$="d:\" then
  1142. file1$="d:\config.sys"
  1143. endif
  1144.  
  1145. if drive$="D:\" then
  1146. file1$="d:\config.sys"
  1147. endif
  1148.  
  1149. if drive$="e:\" then
  1150. file1$="e:\config.sys"
  1151. endif
  1152.  
  1153. if drive$="a:\" then
  1154. file2$="a:\config.bak"
  1155. endif
  1156.  
  1157. if drive$="A:\" then
  1158. file2$="a:\config.bak"
  1159. endif
  1160.  
  1161. if drive$="b:\" then
  1162. file2$="b:\config.bak"
  1163. endif
  1164.  
  1165. if drive$="B:\" then
  1166. file2$="b:\config.bak"
  1167. endif
  1168.  
  1169. if drive$="c:\" then
  1170. file2$="c:\config.bak"
  1171. endif
  1172.  
  1173. if drive$="C:\" then
  1174. file2$="c:\config.bak"
  1175. endif
  1176.  
  1177. if drive$="d:\" then
  1178. file2$="d:\config.bak"
  1179. endif
  1180.  
  1181. if drive$="D:\" then
  1182. file2$="d:\config.bak"
  1183. endif
  1184.  
  1185. if drive$="e:\" then
  1186. file2$="e:\config.bak"
  1187. endif
  1188.  
  1189. if drive$="E:\" then
  1190. file2$="e:\config.bak"
  1191. endif
  1192.  
  1193. confmenu:
  1194. width 40
  1195. print "You have the following options:"
  1196. print
  1197. print
  1198. print "1- Just view the CONFIG.SYS file."
  1199. print
  1200. print "2- Add lines to the end of your file."
  1201. print
  1202. print "3- Create a new CONFIG.SYS file."
  1203. print
  1204. print "4- Return to the Main Options Menu."
  1205. print
  1206. print
  1207. print "Please press the key corresponding to"
  1208. print "your choice. ";
  1209.  
  1210. wait6:
  1211. gosub continue:
  1212.  
  1213. if a$="1" then
  1214. gosub seesys:
  1215. goto confmenu:
  1216. endif
  1217.  
  1218. if a$="2" then
  1219. cls
  1220. gosub appendln:
  1221. gosub seesys:
  1222. goto confmenu:
  1223. endif
  1224.  
  1225. if a$="3" then
  1226. cls
  1227. goto newfilec:
  1228. endif
  1229.  
  1230. if a$="4" then 3rdmenu:
  1231. goto wait6:
  1232.  
  1233. rem THIS SECTION CREATES A NEW CONFIG.SYS FILE.
  1234.  
  1235. newfilec:
  1236. width 40
  1237. name file1$ as file2$
  1238. kill file1$
  1239. print ""
  1240. print ""
  1241. print "Your CONFIG.SYS file has been changed"
  1242. print "to CONFIG.BAK in order to save it for"
  1243. print "future use.  To use it later, your new"
  1244. print "CONFIG.SYS will be have to be renamed"
  1245. print "to something else (for example,"
  1246. print "CONFIG.X), and your .BAK file renamed"
  1247. print "CONFIG.SYS."
  1248. print
  1249. print
  1250. print "Press any key to continue. ";
  1251. gosub continue:
  1252.  
  1253. changeagn:
  1254. cls
  1255. open "o",1,file1$
  1256. print "How many files do you want?  To quit,"
  1257. print "press Q and Enter."
  1258. print
  1259. input filenumb$
  1260. if filenumb$="q" then restorec:
  1261. if filenumb$="Q" then restorec:
  1262. line1$="files="+filenumb$
  1263. print # 1, line1$ nonull
  1264. print # 1, crlf$ nonull
  1265. print ""
  1266. print ""
  1267. print "How many buffers do you want";
  1268. input buffer$
  1269. buffline$="buffers="+buffer$
  1270. print # 1, buffline$ nonull
  1271. print # 1, crlf$ nonull
  1272. gosub listsys:
  1273.  
  1274. devcagain:
  1275. print ""
  1276. print "Which device would you like to incude"
  1277. print "(N for none)";
  1278. input device$
  1279. if device$="n" then nodevice:
  1280. if device$="N" then nodevice:
  1281. deviceln$="devices="+device$
  1282. print # 1, deviceln$ nonull
  1283. print # 1, crlf$ nonull
  1284. print ""
  1285. print "Would you like to include more"
  1286. print "devices";
  1287. input incldmore$
  1288. if incldmore$="y" then devcagain:
  1289. if incldmore$="Y" then devcagain:
  1290.  
  1291. nodevice:
  1292. print
  1293. print "Do you want Break on or off (if not"
  1294. print "sure, type OFF)";
  1295. input breakyn$
  1296. breaklin$="break=on"
  1297. if breakyn$="on" then
  1298. print # 1, breaklin$ nonull
  1299. print # 1, crlf$ nonull
  1300. endif
  1301.  
  1302. if breakyn$="ON" then
  1303. print # 1, breaklin$ nonull
  1304. print # 1, crlf$ nonull
  1305. endif
  1306.  
  1307. if breakyn$="oN" then
  1308. print # 1, breaklin$ nonull
  1309. print # 1, crlf$ nonull
  1310. endif
  1311.  
  1312. if breakyn$="On" then
  1313. print # 1, breaklin$ nonull
  1314. print # 1, crlf$ nonull
  1315. endif
  1316.  
  1317. close 1
  1318. gosub seesys:
  1319. print
  1320. print "If this is not O.K. AND you want to go"
  1321. print "back and change the file, press C and"
  1322. print "then press Enter."
  1323. print
  1324. print "To restore your original CONFIG.SYS,"
  1325. print "press R and Enter."
  1326. print
  1327. print "If you're happy with it as is, type OK"
  1328. print "and Enter."
  1329. print
  1330. input change$
  1331.  
  1332. okdecide:
  1333. if change$="c" then changeagn:
  1334. if change$="C" then changeagn:
  1335. if change$="r" then restorec:
  1336. if change$="R" then restorec:
  1337. if change$="ok" then confmenu:
  1338. if change$="OK" then confmenu:
  1339. if change$="oK" then confmenu:
  1340. if change$="Ok" then confmenu:
  1341. print
  1342. print "You must choose between C, R, or OK."
  1343. print
  1344. input change$
  1345. goto okdecide:
  1346.  
  1347. restorec:
  1348. cls
  1349. close 1
  1350. close 2
  1351. kill file1$
  1352. name file2$ as file1$
  1353. kill file2$
  1354. print "Your original CONFIG.SYS file has been"
  1355. print "restored."
  1356. print
  1357. print
  1358. print "Press any key to continue. ";
  1359. gosub continue:
  1360. goto confmenu:
  1361.  
  1362.  
  1363. rem HERE IS THE ROUTINE FOR LOOKING AT THE CONFIG.SYS FILE.
  1364.  
  1365. seesys:
  1366. close 1
  1367. close 2
  1368. print "Here is your file:"
  1369. print
  1370. print
  1371. open "i",1,file1$
  1372.  
  1373. nextlnco:
  1374. input # 1, line$ crlf
  1375. print line$
  1376.  
  1377. if error=99 then
  1378. close 1
  1379. print
  1380. print
  1381. print "Press any key to continue. ";
  1382. gosub continue:
  1383. return
  1384. endif
  1385.  
  1386. goto nextlnco:
  1387.  
  1388. rem THIS IS THE END OF THE ROUTINE FOR LOOKING AT THE CONFIG.SYS FILE.
  1389.  
  1390.  
  1391. rem HERE IS THE ROUTINE FOR ADDING LINES TO THE END OF CONFIG.SYS.
  1392.  
  1393. appendln:
  1394. close 1
  1395. close 2
  1396. open "a",1,file1$
  1397.  
  1398. appendagn:
  1399. print ""
  1400. print "Line to add (Q to quit)";
  1401. input appendln$
  1402.  
  1403. if appendln$="q" then
  1404. close 1
  1405. return
  1406. endif
  1407.  
  1408. if appendln$="Q" then
  1409. close 1
  1410. return
  1411. endif
  1412.  
  1413. print # 1, appendln$ nonull
  1414. print # 1, crlf$ nonull
  1415. goto appendagn:
  1416.  
  1417. rem THIS IS THE END OF THE ROUTINE FOR ADDING LINES TO CONFIG.SYS.
  1418.  
  1419.  
  1420. rem HERE IS THE ROUTINE FOR LISTING THE DEVICES FOR CONFIG.SYS.
  1421.  
  1422. listsys:
  1423. print
  1424. print "Do you want a list of the system"
  1425. print "devices available (y/n)? ";
  1426.  
  1427. wait7:
  1428. gosub continue:
  1429. if a$="y" then dolist:
  1430. if a$="Y" then dolist:
  1431.  
  1432. if a$="n" then
  1433. return
  1434. endif
  1435.  
  1436. if a$="N" then
  1437. return
  1438. endif
  1439.  
  1440. dolist:
  1441. cls
  1442. print "(Don't count CONFIG.SYS as a system"
  1443. print "device)"
  1444. print
  1445. print
  1446. files$="*.sys"
  1447. attrib=0
  1448. filename$=find first(files$,attrib)
  1449. if error>0 then done:
  1450. print filename$
  1451.  
  1452. while error>0
  1453. filename$=find continue
  1454. print filename$
  1455. file=file+1
  1456.  
  1457. if file=20 then
  1458. print ""
  1459. print ""
  1460. print "Press any key to continue. ";
  1461. gosub continue:
  1462. file=0
  1463. print
  1464. print
  1465. endif
  1466.  
  1467. wend
  1468.  
  1469. done:
  1470. print ""
  1471. print ""
  1472. print "Press any key to continue. ";
  1473. gosub continue:
  1474. file=0
  1475. file$=""
  1476. filename$=""
  1477. print ""
  1478. print ""
  1479. return
  1480.  
  1481. rem THIS IS THE END OF THE ROUTINE FOR LISTING THE DEVICES FOR CONFIG.SYS.
  1482.  
  1483. rem THIS IS THE END OF THE ROUTINE FOR WORKING WITH CONFIG.SYS.
  1484.  
  1485.  
  1486. rem HERE IS THE ROUTINE FOR WORKING WITH AUTOEXEC.BAT.
  1487.  
  1488. chngauto:
  1489. width 40
  1490. spaces$=space$(68)
  1491. print spaces$;
  1492. color 0,7
  1493. print "Esc=Quit"
  1494. color 7,0
  1495. print
  1496. print "View or Change your AUTOEXEC.BAT File"
  1497. print
  1498. print
  1499. print "On which drive is your AUTOEXEC.BAT"
  1500. print "file? ";
  1501. gosub retypf40:
  1502.  
  1503. redrivea:
  1504. drive$=file$
  1505. file$=""
  1506. drive$=drive$+"\"
  1507.  
  1508. if drive$="a:\" then
  1509. file1$="a:\autoexec.bat"
  1510. endif
  1511.  
  1512. if drive$="A:\" then
  1513. file1$="a:\autoexec.bat"
  1514. endif
  1515.  
  1516. if drive$="b:\" then
  1517. file1$="b:\autoexec.bat"
  1518. endif
  1519.  
  1520. if drive$="B:\" then
  1521. file1$="b:\autoexec.bat"
  1522. endif
  1523.  
  1524. if drive$="c:\" then
  1525. file1$="c:\autoexec.bat"
  1526. endif
  1527.  
  1528. if drive$="C:\" then
  1529. file1$="c:\autoexec.bat"
  1530. endif
  1531.  
  1532. if drive$="d:\" then
  1533. file1$="d:\autoexec.bat"
  1534. endif
  1535.  
  1536. if drive$="D:\" then
  1537. file1$="d:\autoexec.bat"
  1538. endif
  1539.  
  1540. if drive$="e:\" then
  1541. file1$="e:\autoexec.bat"
  1542. endif
  1543.  
  1544. if drive$="E:\" then
  1545. file1$="e:\autoexec.bat"
  1546. endif
  1547.  
  1548. if drive$="a:\" then
  1549. file2$="a:\autoexec.bak"
  1550. endif
  1551.  
  1552. if drive$="A:\" then
  1553. file2$="a:\autoexec.bak"
  1554. endif
  1555.  
  1556. if drive$="b:\" then
  1557. file2$="b:\autoexec.bak"
  1558. endif
  1559.  
  1560. if drive$="B:\" then
  1561. file2$="b:\autoexec.bak"
  1562. endif
  1563.  
  1564. if drive$="c:\" then
  1565. file2$="c:\autoexec.bak"
  1566. endif
  1567.  
  1568. if drive$="C:\" then
  1569. file2$="c:\autoexec.bak"
  1570. endif
  1571.  
  1572. if drive$="d:\" then
  1573. file2$="d:\autoexec.bak"
  1574. endif
  1575.  
  1576. if drive$="D:\" then
  1577. file2$="d:\autoexec.bak"
  1578. endif
  1579.  
  1580. if drive$="e:\" then
  1581. file2$="e:\autoexec.bak"
  1582. endif
  1583.  
  1584. if drive$="E:\" then
  1585. file2$="e:\autoexec.bak"
  1586. endif
  1587.  
  1588. automenu:
  1589. cls
  1590. print "You have the following options:"
  1591. print
  1592. print
  1593. print "F1- Just view the AUTOEXEC.BAT file."
  1594. print
  1595. print "F2- Add lines to the end of your file."
  1596. print
  1597. print "F3- Create a new AUTOEXEC.BAT file."
  1598. print
  1599. print "Exc- Return to the Main Options Menu."
  1600. print
  1601. print
  1602. print "Please press the key corresponding to"
  1603. print "your choice. ";
  1604.  
  1605. wait8:
  1606. gosub continue:
  1607. if a$=b$ then menu40:
  1608. if  extended=0 then wait8:
  1609.  
  1610. if a$=";" then
  1611. cls
  1612. gosub autolook:
  1613. goto automenu:
  1614. endif
  1615.  
  1616. if a$="<" then
  1617. cls
  1618. gosub appndaut:
  1619. gosub autolook:
  1620. goto automenu:
  1621. endif
  1622.  
  1623. if a$="=" then
  1624. cls
  1625. goto newauto:
  1626. endif
  1627.  
  1628. goto wait8:
  1629.  
  1630.  
  1631. rem THIS ROUTINE CREATES A NEW AUTOEXEC.BAT FILE.
  1632.  
  1633. newauto:
  1634. cls
  1635. name file1$ as file2$
  1636. kill file1$
  1637. cls
  1638. print "Your AUTOEXEC.BAT file has been"
  1639. print "changed to AUTOEXEC.BAK in order to"
  1640. print "save it for later use.  To use it"
  1641. print "later, you will have to rename it"
  1642. print "AUTOEXEC.BAT after renaming the cur-"
  1643. print "rent AUTOEXEC.BAT to something else"
  1644. print "for example, AUTOEXEC.X)."
  1645. print
  1646. print
  1647. print "Press any key to continue. ";
  1648. gosub continue:
  1649.  
  1650. scndchng:
  1651. cls
  1652. spaces$=space$(68)
  1653. print spaces$;
  1654. color 0,7
  1655. print "Esc=Quit"
  1656. color 7,0
  1657. open "o",1,file1$
  1658. print "Please type the first line you want,"
  1659. print "then press Enter."
  1660. print
  1661. print "> ";
  1662. gosub retypf40:
  1663. firstlin$=file$
  1664. file$=""
  1665.  
  1666. if firstlin$=b$ then
  1667. goto nochange:
  1668. endif
  1669.  
  1670. print # 1, firstlin$ nonull
  1671. print # 1, crlf$ nonull
  1672.  
  1673. contline:
  1674. print ""
  1675. print "Please type your next line, followed"
  1676. print "by Enter."
  1677. print ""
  1678. print "> ";
  1679. gosub retypf40:
  1680. nextline$=file$
  1681. file$=""
  1682.  
  1683. if nextline$=b$ then
  1684. goto stopchng:
  1685. endif
  1686.  
  1687. print # 1, nextline$ nonull
  1688. print # 1, crlf$ nonull
  1689. goto contline:
  1690.  
  1691. stopchng:
  1692. close 1
  1693. cls
  1694. gosub autolook:
  1695. print
  1696. print
  1697. print
  1698. print "If this is not O.K. AND you want to"
  1699. print "change it, press C and then Enter."
  1700. print
  1701. print "To restore your original AUTOEXEC.BAT,"
  1702. print "press R and then Enter."
  1703. print
  1704. print "If you're happy with it as is, type OK"
  1705. print "and Enter."
  1706. print
  1707. print "> ";
  1708. gosub retypf40:
  1709. changeyn$=file$
  1710. file$=""
  1711.  
  1712. rechange:
  1713.  
  1714. if changeyn$="c" then
  1715. goto scndchng:
  1716. endif
  1717.  
  1718. if changeyn$="C" then
  1719. goto scndchng:
  1720. endif
  1721.  
  1722. if changeyn$="r" then
  1723. goto nochange:
  1724. endif
  1725.  
  1726. if changeyn$="R" then
  1727. goto nochange:
  1728. endif
  1729.  
  1730. if changeyn$="ok" then
  1731. goto automenu:
  1732. endif
  1733.  
  1734. if changeyn$="OK" then
  1735. goto automenu:
  1736. endif
  1737.  
  1738. if changeyn$="oK" then
  1739. goto automenu:
  1740. endif
  1741.  
  1742. if changeyn$="Ok" then
  1743. goto automenu:
  1744. endif
  1745.  
  1746. print
  1747. print "You must choose C, R, or OK."
  1748. print
  1749. gosub retypf40:
  1750. changeyn$=file$
  1751. file$=""
  1752. goto rechange:
  1753.  
  1754. nochange:
  1755. cls
  1756. close 1
  1757. close 2
  1758. kill file1$
  1759. name file2$ as file1$
  1760. kill file2$
  1761. print "Your original AUTOEXEC.BAT file has"
  1762. print "been restored."
  1763. print
  1764. print
  1765. print "Press any key to continue. ";
  1766. gosub continue:
  1767. goto automenu:
  1768.  
  1769.  
  1770. rem HERE IS THE ROUTINE FOR LOOKING AT THE AUTOEXEC.BAT FILE.
  1771.  
  1772. autolook:
  1773. cls
  1774. close 1
  1775. close 2
  1776. print "Here is your file:"
  1777. print
  1778. print
  1779. open "i",1,file1$
  1780.  
  1781. nextline:
  1782. input # 1, line$ crlf
  1783. print line$
  1784.  
  1785. if error=99 then
  1786. close 1
  1787. print
  1788. print
  1789. print "Press any key to continue. ";
  1790. gosub continue:
  1791. return
  1792. endif
  1793.  
  1794. goto nextline:
  1795.  
  1796. rem THIS IS THE END OF THE ROUTINE FOR LOOKING AT THE AUTOEXEC.BAT FILE.
  1797.  
  1798.  
  1799. rem HERE IS THE ROUTINE FOR ADDING LINES TO THE END OF AUTOEXEC.BAT.
  1800.  
  1801. appndaut:
  1802. cls
  1803. spaces$=space$(68)
  1804. color 0,7
  1805. print "Esc=Quit"
  1806. color 7,0
  1807. print
  1808. close 1
  1809. close 2
  1810. open "a",1,file1$
  1811.  
  1812. appndagn:
  1813. print ""
  1814. print "Line to add? ";
  1815. gosub retypf40:
  1816. appendln$=file$
  1817. file$=""
  1818.  
  1819. if appendln$=b$ then
  1820. close 1
  1821. return
  1822. endif
  1823.  
  1824. print # 1, appendln$ nonull
  1825. print # 1, crlf$ nonull
  1826. goto appndagn:
  1827.  
  1828. rem THIS IS THE END OF THE ROUTINE FOR ADDING TO THE END OF AUTOEXEC.BAT.
  1829.  
  1830. rem THIS IS THE END OF THE ROUTINE FOR WORKING WITH AUTOEXEC.BAT.
  1831.  
  1832.  
  1833. rem Here is the routine for blanking your screen.
  1834.  
  1835. blankscr:
  1836. cls
  1837. locate 81,81
  1838. gosub continue:
  1839. return
  1840.  
  1841. rem This is the end of the routine for blanking your screen.
  1842.  
  1843.  
  1844. rem Here is the routine for typing in files in 40-column mode.
  1845.  
  1846. retypf40:
  1847. gosub continue:
  1848.  
  1849. if a$=b$ then
  1850. file$=""
  1851. file1$=""
  1852. file2$=""
  1853. goto menu40:
  1854. endif
  1855.  
  1856. if a$=c$ then
  1857. return
  1858. endif
  1859.  
  1860. gosub cursor:
  1861.  
  1862. if a$=d$ then
  1863. locate a,c
  1864. print e$;
  1865. locate a,c
  1866. d=len(file$)
  1867. e=d-1
  1868. file$=mid$(file$,1,e)
  1869. if e<0 then
  1870. e=0
  1871. c=c+1
  1872. locate a,c
  1873. endif
  1874. if b=0 then
  1875. a=a-1
  1876. b=38
  1877. locate a,b
  1878. print e$;
  1879. locate a,b
  1880. endif
  1881. goto retypf40:
  1882. endif
  1883.  
  1884. print a$;
  1885. file$=file$+a$
  1886. goto retypf40:
  1887.  
  1888. rem This is the end of the routine for typing in files in 40-column mode.
  1889.  
  1890.  
  1891. rem Here is the routine for continuing when the user presses a key.
  1892.  
  1893. continue:
  1894. a$=inkey$
  1895. if a$="" then continue:
  1896. return
  1897.  
  1898. rem This is the end of the routine for continuing when the user presses a key.
  1899.  
  1900. rem Here is the subroutine for initializing row/column position of cursor.
  1901.  
  1902. cursor:
  1903. a=csrlin
  1904. b=pos(0)
  1905. c=b-1
  1906. return
  1907.  
  1908. rem This is the end of the routine for initializing cursor position.
  1909.  
  1910.  
  1911.  
  1912. rem Here are the error-handling routines.
  1913.  
  1914. rem Here is the error routine for shelling to DOS in 40-column mode.
  1915.  
  1916. nocall40:
  1917. cls
  1918. print "Hi.  COMMAND.COM can't be found on the"
  1919. print "drive you've specified.  You may have"
  1920. print "specified the wrong drive, or have"
  1921. print "failed to place your DOS disk into the"
  1922. print "drive you specified."
  1923. print
  1924. print "If you'd like to try again, you may"
  1925. print "return to the SHELL routine.  If you'd"
  1926. print "rather not, you may return to the Main"
  1927. print "Options Menu."
  1928. print
  1929. print
  1930. print "Would you like to try again? (y/n) ";
  1931.  
  1932. wait22:
  1933. gosub continue:
  1934. if a$="y" then shell40:
  1935. if a$="Y" then shell40:
  1936. if a$="n" then menu40:
  1937. if a$="N" then menu40:
  1938. goto wait22:
  1939.  
  1940. rem This is the end of the error routine for shelling to DOS in 40-column mode.
  1941.  
  1942.  
  1943. rem Here are the error routines for makedr40:
  1944.  
  1945. rem Path Not Found (Error 3)
  1946.  
  1947. nopthm40:
  1948. directory$=""
  1949. cls
  1950. print "Hi.  The path you've specified can't"
  1951. print "be found.  Please check your spelling"
  1952. print "and path, and try again."
  1953. print
  1954. print "To quit and return to the Main Options"
  1955. print "Menu, press Esc."
  1956. print "Directory name (include drive and"
  1957. print "path)? ";
  1958. gosub retypf40:
  1959. directory$=file$
  1960. goto remake40:
  1961.  
  1962. rem This is the end of the error routine for Path Not Found (makedr40:)
  1963.  
  1964. rem Access Denied (Error 5)
  1965.  
  1966. ilglmd40:
  1967. cls
  1968. print "Hi.  The path you've specified is pro-"
  1969. print "tected.  DOS will not allow you to"
  1970. print "make a directory using this path."
  1971. print
  1972. print
  1973. print "Press any key to return to the Main"
  1974. print "Options Menu. ";
  1975. gosub continue:
  1976. goto menu40:
  1977.  
  1978. rem This is the end of the error routine for Access Denied (makedr40:)
  1979.  
  1980. rem This is the end of the error routines for makedr40:
  1981.  
  1982. rem Here are the error routines for renfil40:
  1983.  
  1984. rem File Not Found (Error 2)
  1985.  
  1986. noflrf40:
  1987. file1$=""
  1988. file2$=""
  1989. cls
  1990. print "Hi.  The file you've specified can't"
  1991. print "be found.  Please check your spelling"
  1992. print "and path, and try again."
  1993. print
  1994. print "To quit and return to the Main Options"
  1995. print "Menu, press Esc."
  1996. print
  1997. print
  1998. print "File to rename? ";
  1999. gosub retypf40:
  2000. file1$=file$
  2001. realfil1$=ucase$(file1$)
  2002.  
  2003. print ""
  2004. print ""
  2005. print "New name for ";
  2006. print realfil1$;
  2007. print "? ";
  2008. gosub retypf40:
  2009. file2$=file$
  2010. realfil2$=ucase$(file2$)
  2011. goto refile40:
  2012.  
  2013. rem This is the end of the File Not Found error handler (renfil40:)
  2014.  
  2015.  
  2016. rem Path Not Found or File Doesn't Exist (Error 3)
  2017.  
  2018. nopthr40:
  2019. file1$=""
  2020. file2$=""
  2021. cls
  2022. print "Hi.  DOS can't find the path you've"
  2023. print "specified.  Please check your spelling"
  2024. print "and path, and try again."
  2025. print
  2026. print "To quit and return to the Main Options"
  2027. print "Menu, press Esc."
  2028. print
  2029. print
  2030. print "File to rename? ";
  2031. gosub retypf40:
  2032. file1$=file$
  2033. realfil1$=ucase$(file1$)
  2034. print ""
  2035. print ""
  2036. print "New name for ";
  2037. print realfil1$;
  2038. print "? ";
  2039. gosub retypf40:
  2040. file2$=file$
  2041. realfil2$=ucase$(file2$)
  2042. goto refile40:
  2043.  
  2044. rem This is the end of the routine for Path Not Found (renfil40:)
  2045.  
  2046.  
  2047. rem Here is the error routine for Access Denied (Error 5)
  2048.  
  2049. ilglrf40:
  2050. cls
  2051. print "Hi.  The file you've specified is pro-"
  2052. print "tected.  DOS will not allow you to re-"
  2053. print "name this file."
  2054. print
  2055. print
  2056. print "Press any key to return to the Main"
  2057. print "Options Menu. ";
  2058. gosub continue:
  2059. goto menu40:
  2060.  
  2061. rem This is the end of the error routine for Access Denied (renfil40:)
  2062.  
  2063.  
  2064. rem Here is the routine for Not Same Disk Drive (Error 17)
  2065.  
  2066. difdrr40:
  2067. file2$=""
  2068. cls
  2069. print "Hi.  You've specified a different"
  2070. print "drive for your file than it was orig-"
  2071. print "inally on.  For instance, if the orig-"
  2072. print "inal file was on drive A, the renamed"
  2073. print "file must be on drive A as well."
  2074. print
  2075. print "Please check your spelling and/or path"
  2076. print "and try again.  To quit and return to"
  2077. print "the Main Options Menu, press Esc."
  2078. print
  2079. print
  2080. print "New name for ";
  2081. print realfil1$;
  2082. print "? "
  2083. gosub retypf40:
  2084. file2$=file$
  2085. realfil2$=ucase$(file2$)
  2086. goto refile40:
  2087.  
  2088. rem This is the end of the error routine for Not Same Disk Drive (renfil40:)
  2089.  
  2090. rem Here is the error routine for File Not Found (prfile40:)
  2091.  
  2092. nofilp40:
  2093. cls
  2094. file$=""
  2095. print "Hi.  The file you've specified can't"
  2096. print "be found.  Please check your speling"
  2097. print "and path, and try again.  To quit and"
  2098. print "return to the Main Options Menu, press"
  2099. print "Esc at any time."
  2100. print
  2101. print
  2102. print "File to print? ";
  2103. gosub retypf40:
  2104. realfile$=ucase$(file$)
  2105. goto doprfl40:
  2106.  
  2107. rem This is the end of the error routine for File Not Found (prfile40:).
  2108.  
  2109.  
  2110. rem Here is the error routine for Path Not Found (prfile40:)
  2111.  
  2112. nopthp40:
  2113. file$=""
  2114. cls
  2115. print "Hi.  The path you've specified can't"
  2116. print "be found.  Please check your spelling"
  2117. print "and path, and try again.  To quit and"
  2118. print "return to the Main Options Menu, press"
  2119. print "Esc at any time."
  2120. print
  2121. print
  2122. print "File to print? ";
  2123. gosub retypf40:
  2124. realfile$=ucase$(file$)
  2125. goto doprfl40:
  2126.  
  2127. rem This is the end of the error routine for Path Not Found (prfile40:)
  2128.  
  2129.  
  2130. rem Here are the error routines for removedr:
  2131.  
  2132. rem Here is the error routine for Path Not Found (removedr:)
  2133.  
  2134. nopathrm:
  2135. cls
  2136. print "Hi.  The path you've specified for the"
  2137. print "directory you want to remove can't be"
  2138. print "found.  Please check your spelling and"
  2139. print "try again.  To quit and return to the"
  2140. print "Main Options Menu, press Esc at any"
  2141. print "time."
  2142. print
  2143. print "Directory to remove? ";
  2144. gosub retypf40:
  2145. goto reremove:
  2146.  
  2147. rem THIS IS THE END OF THE ERROR ROUTINE FOR PATH NOT FOUND (REMOVEDR:)
  2148.  
  2149.  
  2150. rem HERE IS THE ERROR ROUTINE FOR ACCESS DENIED (REMOVEDR:)
  2151.  
  2152. accessde:
  2153. cls
  2154. print "Hi.  The path you've specified is pro-"
  2155. print "tected from changes.  DOS will not"
  2156. print "allow you to remove a directory using"
  2157. print "this path."
  2158. print
  2159. print "Press any key to return to the Main"
  2160. print "Options Menu. ";
  2161. gosub continue:
  2162. goto menu40:
  2163.  
  2164. rem THIS IS THE END OF THE ROUTINE FOR ACCESS DENIED (REMOVEDR:)
  2165.  
  2166.  
  2167. rem HERE IS THE ERROR ROUTINE FOR CAN'T REMOVE DIRECTORY (REMOVEDR:)
  2168.  
  2169. cantrmdi:
  2170. cls
  2171. print "Hi.  The directory you've specified"
  2172. print "can't be removed.  It probably con-"
  2173. print "tains either files or subdirectories."
  2174. print "You can use the Find File option to"
  2175. print "determine this."
  2176. print
  2177. print
  2178.  
  2179. rmdirmen:
  2180. print "F1- Try again, I goofed."
  2181. print
  2182. print "F2- Go to the Find Files Option."
  2183. print
  2184. print "Esc- Return to the Main Options Menu."
  2185. print
  2186. print
  2187. print "Please press the key corresponding to"
  2188. print "your choice. ";
  2189.  
  2190. wait5:
  2191. gosub continue:
  2192. if a$=b$ then menu40:
  2193. if extended=0 then wait5:
  2194.  
  2195. if a$=";" then
  2196. print
  2197. print "Directory to remove? ";
  2198. gosub retypf40:
  2199. goto reremove:
  2200. endif
  2201.  
  2202. if a$="<" then
  2203. call ("util1-80.com"," /s 40")
  2204. goto rmdirmen:
  2205. endif
  2206.  
  2207. rem THIS IS THE END OF THE ROUTINE FOR CAN'T REMOVE DIRECTORY (REMOVEDR:)
  2208.  
  2209. rem THIS IS THE END OF THE ERROR ROUTINES FOR REMOVEDR:
  2210.  
  2211.  
  2212. rem HERE ARE THE ERROR ROUTINES FOR MOVEFILE:
  2213.  
  2214. rem HERE IS THE ERROR ROUTINE FOR FILE NOT FOUND (MOVEFILE:)
  2215.  
  2216. nofilemf:
  2217. file1$=""
  2218. cls
  2219. print "Hi.  The file you've specified can't"
  2220. print "be found.  Please check your spelling"
  2221. print "and path, and try again.  To quit and"
  2222. print "return to the Main Options Menu, press"
  2223. print "Esc at any time."
  2224. print
  2225. print "File to move? ";
  2226. gosub retypf40:
  2227. file1$=file$
  2228. file$=""
  2229. realfil1$=ucase$(file$)
  2230. goto reinputm:
  2231.  
  2232. rem THIS IS THE END OF THE ERROR ROUTINE FOR FILE NOT FOUND (MOVEFILE:)
  2233.  
  2234.  
  2235. rem HERE IS THE ERROR ROUTINE FOR PATH NOT FOUND (MOVEFILE:)
  2236.  
  2237. nopathmf:
  2238. cls
  2239. print "Hi.  The path you've specified can't"
  2240. print "be found.  Please check your spelling"
  2241. print "and path, and try again.  To quit and"
  2242. print "return to the Main Options Menu, press"
  2243. print "Esc at any  time."
  2244. print
  2245.  
  2246. if io=1 then
  2247. file1$=""
  2248. print "File to move? ";
  2249. gosub retypf40:
  2250. file1$=file$
  2251. file$=""
  2252. realfil1$=ucase$(file1$)
  2253. goto reinputm:
  2254. endif
  2255.  
  2256. if io=2 then
  2257. file2$=""
  2258. print "Destination for ";
  2259. print realfile$;
  2260. print "?"
  2261. print "> ";
  2262. gosub retypf40:
  2263. file2$=file$
  2264. file$=""
  2265. realfil2$=ucase$(file2$)
  2266. goto reoutpum:
  2267. endif
  2268.  
  2269. rem THIS IS THE END OF THE ERROR ROUTINE FOR PATH NOT FOUND (MOVEFILE:)
  2270.  
  2271.  
  2272. rem HERE IS THE ERROR ROUTINE FOR ACCESS DENIED (MOVEFILE:)
  2273.  
  2274. noopenmf:
  2275. file2$=""
  2276. cls
  2277. print "Hi.  The file you've specified as your"
  2278. print "destination exists and is protected."
  2279. print "DOS will not allow you to overwrite"
  2280. print "that file.  Please enter another file"
  2281. print "as the destination.  To quit and re-"
  2282. print "turn to the Main Options Menu, press"
  2283. print "Esc at any time."
  2284. print
  2285. print "Destination for ";
  2286. print realfil1$;
  2287. print "?"
  2288. print "> ";
  2289. gosub retypf40:
  2290. file2$=file$
  2291. file$=""
  2292. realfil2$=ucase$(file2$)
  2293. goto reoutpum:
  2294.  
  2295. rem THIS IS THE END OF THE ERROR ROUTINE FOR ACCESS DENIED (MOVEFILE:)
  2296.  
  2297. rem THIS IS THE END OF THE ERROR ROUTINES FOR MOVEFILE:
  2298.  
  2299.  
  2300. rem Here is the error routine for runoth40:
  2301.  
  2302. cantrn40:
  2303. cls
  2304. print "Hi.  There's been some trouble loading"
  2305. print "and/or running the program you've"
  2306. print "specified.  Here's the program and the"
  2307. print "parameter, if any, you asked for:"
  2308. print program$;
  2309. print argument$
  2310. print
  2311. print "Is this what you intended to type"
  2312. print "(y/n)? ";
  2313.  
  2314. wait28:
  2315. gosub continue:
  2316. if a$="y" then probrn40:
  2317. if a$="Y" then probrn40:
  2318. if a$="n" then clagan40:
  2319. if a$="N" then clagan40:
  2320. goto wait28:
  2321.  
  2322. probrn40:
  2323. cls
  2324. print "The Manager has trouble running some"
  2325. print "programs.  For instance, parameters"
  2326. print "are often passed to CHKDSK.EXE which"
  2327. print "were never intended.  These seem to"
  2328. print "have something to do with the DOS"
  2329. print "parameters that were set up in the"
  2330. print "source.  Your best bet is to shell to"
  2331. print "DOS and run your program from there."
  2332. print "Press any key to return to the Main"
  2333. print "Options Menu. ";
  2334. gosub continue:
  2335. goto 2dmenu40:
  2336.  
  2337. clagan40:
  2338. cls
  2339. print "You're about to be returned to the Run"
  2340. print "Other Programs option, where you can"
  2341. print "retype your program and argument.  If"
  2342. print "you get this error again, and are sure"
  2343. print "you typed it in correctly, type y or Y"
  2344. print "at the prompt for bug info on this op-"
  2345. print "tion."
  2346. print
  2347. print "Press any key to return to the Run"
  2348. print "Other Programs option. ";
  2349. gosub continue:
  2350. goto runoth40:
  2351.  
  2352.  
  2353. end
  2354.