home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / rbatch13.zip / RBATCH13.BOK < prev    next >
Text File  |  1995-08-01  |  314KB  |  8,369 lines

  1.  
  2.  
  3.        ╔════════════════════════════════════════════════════════╗
  4.        ║                                                        ║
  5.        ║  ▐██▌▐▌▐▌▐▌ █    ▐██▌ ▐▌ ▐██▌ ▐██▐▌▐▌    ▐██▌▐▌▐▌▐▌ █  ║
  6.        ║   █ █▐▌▐▌▐█ █     █ █ ██ ▐▐▌▌ █ █▐▌▐▌     █ █▐▌▐▌▐█ █  ║
  7.        ║   █ █▐▌▐▌▐█▌█     █ █▐▌▐▌ ▐▌ ▐▌  ▐▌▐▌     █ █▐▌▐▌▐█▌█  ║
  8.        ║   ██▌▐▌▐▌▐▌██     ██▌▐▌▐▌ ▐▌ ▐▌  ▐██▌     ██▌▐▌▐▌▐▌██  ║
  9.        ║   ██ ▐▌▐▌▐▌▐█     █ █▐██▌ ▐▌ ▐▌  ▐▌▐▌     ██ ▐▌▐▌▐▌▐█  ║
  10.        ║   █▐▌▐▌▐▌▐▌ █     █ █▐▌▐▌ ▐▌  █ █▐▌▐▌     █▐▌▐▌▐▌▐▌ █  ║
  11.        ║  ▐█ █ ██ ▐▌ █    ▐██▌▐▌▐▌ ██  ▐█▌▐▌▐▌    ▐█ █ ██ ▐▌ █  ║
  12.        ║                                                        ║
  13.        ║                                                        ║
  14.        ╚════════════════════════════════════════════════════════╝
  15.  
  16.  
  17.                         The Run Batch Run Book
  18.  
  19.  
  20.                   Copyright (c) 1995, Finn Roaas
  21.                       All Right Reserved, World Wide
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.                             Finn Roaas
  35.                             Ole Reistads vei 39 D
  36.                             N-1068 Oslo, Norway
  37.  
  38.  
  39.  
  40.                             finnr@oslonett.no
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.      =====================================
  56.       RUN BATCH RUN REGISTRATION FORM
  57.      =====================================
  58.  
  59.      Remit to:  Finn Roaas
  60.                 Ole Reistads vei 39 D
  61.                 N-1068 Oslo, Norway
  62.  
  63.  
  64.      ---------------------------------------------------------------------
  65.      | Item                          | Quantity |  Price     |    Total   |
  66.      |-------------------------------|----------|----------- |------------|
  67.      | RBatch12 version 1.2 (Nor)    | ________ | NOK100.00  | __________ |
  68.      |                               |          |            |            |
  69.      | RBatch13 version 1.3 (Eng)    | ________ |   $ 12.00  | __________ |
  70.      | (A Companion Disk included)   |          |            |            |
  71.      | Diskette 3.5 ( ) 5.25 ( )     | ________ |   $  8.00  | __________ |
  72.      |                               |          | NOK 50.00  |            |
  73.      | Schools (free use 1000        |          |            |            |
  74.      | students for one year         | ________ | NOK1.000,00| __________ |
  75.      | Subscription                  |          |   $ 80.00  |            |
  76.      | Abonnement                    | ________ | NOK480.00  | __________ |
  77.      |                               |          |            |            |
  78.      | Shipping                      | ________ |   $  5.00  | __________ |
  79.      |------------------------------------------------------ |------------|
  80.      |                                                       |            |
  81.      |   Total amount enclosed                               | __________ |
  82.      ----------------------------------------------------------------------
  83.  
  84.      Payment by:  ( ) Check or money order
  85.                   ( ) American Express
  86.                   ( ) Diners Club
  87.                   ( ) MasterCard
  88.                   ( ) Visa
  89.                   ( ) PO # ______________
  90.  
  91.      Card #: ____________________________________  Exp. Date: _________
  92.  
  93.  
  94.  Signature of card holder: ____________________________________________
  95.  
  96.  
  97.      Name:     ________________________________________________________
  98.  
  99.      Company:  ________________________________________________________
  100.  
  101.      Address:  ________________________________________________________
  102.  
  103.                ________________________________________________________
  104.  
  105.                ________________________________________________________
  106.  
  107.      Phone:    ________________________________________________________
  108.  
  109.  
  110.     (  )  Check or money order payable to Finn Roaas in U.S. funds enclosed
  111.     (  )  SWIFT transfer to 6065.56.31588 (Kredittkassen 1067 Oslo, Norway)
  112.     (  )  SWIFT transfer to 0521 1589665 (Postbanken, Norway)
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120. TABLE OF CONTENTS
  121. =================
  122.  
  123. Chapter 1:  Save your files - different methods
  124. Chapter 2:  One day you will regret that you didn't take backup seriously
  125. Chapter 3:  How to make a choice about how a batch should proceed?
  126. Chapter 4:  Edit a batch program
  127. Chapter 5:  Batch pipe problem
  128. Chapter 6:  Searching for files is often time consuming
  129. Chapter 7:  Customizing the command dir
  130. Chapter 8:  How can a batch program answer Y for yes
  131. Chapter 9:  Batch files can be used with memory and RAM
  132. Chapter 10: To remove files accidentally extracted
  133. Chapter 11: Choice
  134. Chapter 12: How to get the system date
  135. Chapter 13: Extracting text strings
  136. Chapter 14: Different batch enhancers and using scan codes
  137. Chapter 15: Batch files and mail
  138. Chapter 16: How to suppress the writing on the screen?
  139. Chapter 17: How to have a batch file testing if Windows is running
  140. Chapter 18: Invisible cursor
  141. Chapter 19: Numbered repeats in batch files
  142. Chapter 20: How you can write batch files that will execute
  143.             certain commands based on the time of day?
  144. Chapter 21: Return to directory
  145. Chapter 22: Make a log with the time and date
  146. Chapter 23: Books, magazines and programs about batch files
  147. Chapter 24: Remove file comment
  148. Chapter 25: FOR in batch files
  149. Chapter 26: Ansi codes in batch file
  150. Chapter 27: About errorlevel
  151. Chapter 28: Rebooting from a batch file
  152. Chapter 29: How to execute a batch file on a certain weekday?
  153. Chapter 30: Y/N in batch files
  154. Chapter 31: Remap keys
  155. Chapter 33: Detecting DblSpace drive
  156. Chapter 34: How to add a path to the existing path?
  157. Chapter 35: Numlock on
  158. Chapter 36: Changing the date during execution
  159. Chapter 37: Undocumented commands
  160. Chapter 38: Ctrl-c/break
  161. Chapter 39: Can't delete directory
  162. Chapter 40: Batch file for cd-rom
  163. Chapter 41: Get the beep out of CHOICE
  164. Chapter 42: How to tell MS DOS not to display any messages?
  165. Chapter 43: How to dump binary files to readable ASCII text?
  166. Chapter 44: A keyboard macro program
  167. Chapter 45: Alternative decoder to using DOS DEBUG
  168. Chapter 46: Increasing file size
  169.  
  170.                         >>>>@@@@<<<<
  171.  
  172. Chapter 1: Save your files - different methods.
  173. ===============================================
  174.  
  175. At the end of this book you will find a presentation of the
  176. the author. As you will see I'm also a novelist and
  177. a writer of modern norwegian literature.
  178. I know how important it is to save my files in a secure
  179. and efficient way. The day you have lost important data
  180. you will understand the importance of taking good care
  181. of all files you produce. When your hard disk is down
  182. and one year's work is wasted it is to late to plan
  183. how you are going to save your files.
  184.  
  185. Some years ago I lost all chapters in a new book I was
  186. writing because of problems with my WC-card. A lot
  187. of different thoughts went through my head when I
  188. realized what had happened, but fortunately I also
  189. remembered that I had copied the files to a floppy.
  190. I looked through my diskettes and thank God I found what
  191. I was looking for. The floppy made it possible to restore
  192. all files to my hard disk.
  193.  
  194. As I said, this happened many years ago. Experience has taught me
  195. the lessons to take good care of my files. This is our first subject.
  196. Let's have a closer look at a batch file I have called
  197.  
  198.  
  199. SAV1.BAT
  200. ========
  201.  
  202. @ECHO OFF 
  203. :start 
  204. IF " %1" ==" " GOTO end
  205. ECHO ***%1 will be saved ***
  206. IF NOT EXIST A:%1 COPY %1 A:
  207. SHIFT 
  208. GOTO start 
  209. :end
  210.  
  211. Every day when I had finished writing a manuscript, essays
  212. or letters, I needed to save the files to a floppy.
  213. The files had different names and I wanted to make a program
  214. that was able to copy more than 9 files. I knew that %1 to %9
  215. parameters gave me the opportunity to run nine variables
  216. through a batch program, but it was not enough. Then I
  217. discovered SHIFT. The command allowed me to use more than nine
  218. batch parameters.
  219.  
  220. The SHIFT command moves the parameters one step to the left
  221. in a batch file. It moves the remaining parameters down one
  222. value, a new %9 is brought in if any exists. In the example
  223. above I use the SHIFT command with three parameters. When a
  224. SHIFT command is executed, it moves the %3 parameter down to
  225. the %2 parameter. The value %2 moves into %1. The original %1
  226. has disappeared. After executing another SHIFT command, the
  227. original %3 has become %1, and the original %2 and %3 are both
  228. gone.
  229.  
  230. The SHIFT command makes it possible to make a short batch
  231. program to execute any number of parameters. The batch file
  232. above illustrates this method. SAV1.BAT may be used to backup
  233. any number of files. Below you will find a description of how
  234. the file works, line by line.
  235.  
  236. The first line turns off the echoing with the command
  237. ECHO  OFF.
  238.  
  239. The label :START in line 2 marks the start of the command
  240. and will be repeated for each parameter.
  241.  
  242. In line 3 the IF command tests if it exists a parameter in
  243. the variable %1. The command makes a comparison between
  244. %1 and the double quotation marks enclosing nothing (" "). This
  245. is called an empty string. You ask MS DOS to compare the first
  246. parameter with nothing or with an empty parameter. If the
  247. comparison is true, the GOTO command ends at the label :end.
  248.  
  249. The ECHO command in line 4 shows the name of the file being
  250. copied.
  251.  
  252. The IF command in line 5 lets your batch file test if the
  253. files you save exists on the diskette in A. If it not exists
  254. the COPY command copies the file from the active drive and
  255. directory to A:.
  256.  
  257. In line 6 the SHIFT command moves parameters one step to the
  258. left.
  259.  
  260. The GOTO command in line 7 returns MS DOS to :START.
  261.  
  262. The label :end in line 8 marks the end of the of the batch file.
  263.  
  264. You run SAV1.BAT with the following command line:
  265.  
  266. C:\> SAV1.BAT autoexec.bat config.sys command.com
  267.  
  268. The batch file ends when %1 is equal to " " - or in another
  269. words - when it is no files left to copy. But the batch file
  270. won't stop. It displays this message:
  271.  
  272.  
  273. Syntax error
  274. *** will be saved ***
  275. A: File not found
  276.         0 File(s) copied.
  277.  
  278. The quickest way to end the program is to press CONTROL - C.
  279.  
  280.  
  281. The command has the following syntax:
  282.  
  283. SAV1 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14
  284.  
  285. I usually name my manuscripts, essays and letters with,
  286. short abbreviations like CHAP1 etc.
  287.  
  288. The end of the batch program above is far from
  289. impressing. But as long as you use the correct
  290. syntax and the file exists the job is done.
  291. Immediately you write a filename that does not
  292. exit or the file does not exist, you'll get an
  293. error message.
  294.  
  295. When the job is done, the SHIFT command runs in loop.
  296. I finish with Control-C. Not very elegant, but
  297. SAV1.BAT gives you an idea how the SHIFT command
  298. works.
  299.  
  300. SAVE.BAT
  301. ========
  302.  
  303. @ECHO OFF
  304. CLS
  305. REM PRESS THE TAB WHEN ECHO IS DONE
  306. ECHO                *** SAVE ***
  307. ECHO.
  308. ECHO Have you inserted the floppy in drive A:
  309. REM The warning will not be displayed if already saved
  310. IF NOT EXIST A:%1 GOTO ready
  311. ECHO
  312. REM CTRL-G creates i bip
  313. ECHO 
  314. a:%1 exists. Press CTRL-BREAK to terminate, or...
  315. PAUSE
  316. :ready
  317. COPY %1 a:%1
  318. IF EXIST A:%1 erase %1
  319. ECHO 
  320. ECHO %1 has been saved to the diskette!
  321.  
  322.  
  323. I have always been looking for good methods to
  324. protect and save my work, but I have also been
  325. looking for ways to control the performance.
  326. In long periods I have made use of the batch program
  327. above. Only when a certain condition exists or come true,
  328. for example a certain file exists, the command will be
  329. issued. I noticed immediately that the method improved
  330. my batch files. The method may be used in many different
  331. situations, what you will find in this book. The IF
  332. command is used when you want a batch command to be
  333. carried out only after certain conditions have been met.
  334. For example, the following command starts Qedit when Q
  335. is used as a parameter:
  336.  
  337. IF "%1"=="Q" D:\QE3\Q
  338.  
  339. The command use three parameters:
  340.  
  341. IF (NOT) <condition> <command>
  342. The parameter NOT specifies that MS DOS should carry out the
  343. command only if the conditionis false.
  344.  
  345. In the parameter <condition> it is the condition that must be met.
  346. There are two ways to use <condition>:
  347.  
  348. EXIST <file name> tests wether a specified file exists or not.
  349. Sometimes the system needs the path and directories written.
  350. If the <file name> exists, the condition is met.
  351.  
  352. <string1>==<string2> compare two strings. These values
  353. can be strings or batch variables such as %1. If the
  354. strings are identical, the condition is met. Notice that
  355. two equal signs are required.
  356.  
  357. <command> is any MS DOS command.
  358.  
  359. The command CLS in line 2 makes batch file starts
  360. with cleared screen, and the user sees only the message.
  361.  
  362. The command REM in line 3 reminds us of that the space in
  363. line 4 is produced by pushing the tab key three times.
  364.  
  365. The headline * * * SAVE * * * in line 4 shows up,
  366. and is displayed in the center, because we have pressed three
  367. times on the tab key.
  368.  
  369. The command ECHO in line 5 displays empty line just below
  370. the headline. <Alt-255> is the ASCII code for empty character.
  371. To produce ANSI characters that are not on your keyboard, you
  372. have to use the following method: Hold down Alt and type the
  373. number that corresponds to the character you want
  374. NumLock must be on. Then release Alt.
  375.  
  376. The command REM in line 8 makes a comment on the command
  377. GOTO in line 9.
  378.  
  379. There is another command ECHO in line 10. It has a
  380. dot and displays en empty line to make the warning
  381. more visible.
  382.  
  383. The command REM in line 11 comments the sound in
  384. line 12 and it's used together with ECHO.
  385. Hold down CTRL and type G
  386.  
  387. The command ECHO in line writes a message du the screen:
  388. The file has been saved to the diskette.
  389.  
  390. COPY ALL FILES
  391. ==============
  392.  
  393.  
  394. Neither COPY *.* nor XCOPY *.* copy all files if you want to
  395. copy to more than one diskette. But there are easy methods to
  396. get COPY *.* to do what you want the command to do, namely copy
  397. all and don't leave out files because the diskette is full.
  398.  
  399. Below I will take a detailed look at two little used methods
  400. to search for bugs in batch files. I will also look at a smart
  401. way how you can run "for in .. do" loops without display a lot
  402. garbage!
  403.  
  404. The COPY *.* A: means: Copy all files from your hard disk
  405. to drive A:. Did I type all? Yea, but that's exactly what
  406. it doesn't do. Suddenly the diskette in drive A: is full.
  407. The floppy in drive A: takes only 720 Kbyte, but you need
  408. maybe to copy 900 Kbyte. If you want to backup the rest of
  409. your files, you will really get a difficult job to find
  410. the files you're missing.
  411.  
  412. There are at least four ways to use to copy all files.
  413. The first I will discuss is the most time consuming one.
  414. Copy *.* to A:. Write the name of the last file listed on
  415. a sheet of paper. This file was not copied to A:.
  416. Type DIR/p and notice all files that are listed below the
  417. file you have written on the sheet of paper.
  418. These are the files that you still haven't copied.
  419.  
  420. Why is it so? Because the command DIR and COPY treat the
  421. files in the same way. You have to copy the listed files
  422. manually. It's a boring job. But the command XCOPY
  423. does copying files simple and easy.
  424. Type XCOPY *.* A:/p.
  425.  
  426. Now you have to answer yes/no for each file you will
  427. copy. At the beginning of the list you just answer N for NO.
  428. When you reach the file you have written on your sheet of
  429. paper, you start answering Y for Yes.
  430.  
  431. It's easy to make a list of all the files you haven't copied.
  432. Type the three lines below:
  433.  
  434.      ECHO OFF
  435.      FOR %a IN (*.*) DO IF NOT EXIST A:%a ECHO %a
  436.      ECHO ON
  437.  
  438. ■    The first line turns off the PROMPT.
  439.  
  440. ■    The third line displays the PROMPT.
  441.  
  442. ■    Unless you want your screen filled up with unnecessary
  443.      information it's recommended use ECHO OFF and ON.
  444.      The second line demonstrates how you can make a "for in
  445.      .. do-loop" in MS DOS without writing it into a batch
  446.      file.
  447.  
  448. After typing the commands above a list of files is displayed.
  449. Stop the scrolling by pressing Ctrl-S. (Don't make mistakes.
  450. Don't type %a on one side and %A on the other side of the
  451. parenthesis. Don't make mistake number two: Use %%a if you
  452. write a batch program. Don't make mistake number three:
  453. MS DOS has problems copying files with 0-bytes. May be one
  454. of your files is a 0-byte file.
  455.  
  456. Sometimes the prompt disappears. This happens for example when
  457. you terminate a batch file or run another batch file using CALL.
  458. Or may be your batch file doesn't run properly. Instead of reboot,
  459. type ECHO ON. Sometimes it occurs that MS DOS can't remember
  460. wether echo is on or off.
  461.  
  462. In creating batch programs you often find yourself testing the
  463. files over and over again. A simple "debug-trick" is to leave
  464. out @ECHO ON in the first line when you run the file.
  465. You save time. You don't need to edit and save all the time.
  466.  
  467. An other method is to place a variable for ECHO OFF.
  468. If your first line is
  469.  
  470. @%test% ECHO OFF
  471.  
  472. you can turn ECHO on and off with the command SET! Type:
  473.  
  474. SET TEST=REM and run the batch file with ECHO on.
  475. Type SET TEST= run the batch file with ECHO off.
  476.  
  477. TOA.BAT provides an easy way to create an advanced batch file
  478. which types a list containing the names of all files in the
  479. directory, make a copy from the list and at last displays it.
  480. Look at TOA.BAT below, it's a nice piece of work.
  481. The program use the command XCOPY to copy possible 0 byte
  482. files, and because XCOPY reports when the diskette is full.
  483. Run TOA.BAT without any arguments at the prompt.
  484. MS DOS moves to the label :START and deletes the old
  485. file catalog called, LISTE.BAT.
  486.  
  487. TOA.BAT uses a temporary batch file to run itself repeatedly.
  488. The program copy all files of a directory to several floppy
  489. diskettes.
  490.  
  491. TOA.BAT
  492. =======
  493.  
  494. @ECHO OFF 
  495. IF %1X==X GOTO START 
  496. IF %1==CATALOG.BAT GOTO END
  497. COPY %1 A:>NUL 
  498. IF EXIST A:%1 GOTO END
  499. REM Don*t stop because of 0 byte files:
  500. XCOPY %1 A: 
  501. IF EXIST A:%1 GOTO END
  502. ECHO Change diskette in A: - Insufficient disk space for %1
  503. PAUSE 
  504. %0 %1 
  505. :START 
  506. IF EXIST CATALOG.BAT DEL CATALOG.BAT
  507. FOR %%a IN (*.*) DO ECHO CALL %0 %%a >>CATALOG.BAT
  508. CALL CATALOG
  509. DEL CATALOG.BAT
  510. :END
  511.  
  512. Normally when you try to delete files that do not exist, you
  513. get the error message "File not found". This message is confusing
  514. and many of you will jump on the keyboard and press CTRL-C.
  515. What's going on! The program is supposed to copy files and can't
  516. find the file! To avoid error messages we will first check it out
  517. TOA.BAT IF CATALOG.BAT exists by executing the command IF EXIST i
  518. line 13.
  519.  
  520. If you already got a file called CATALOG.BAT you need to change
  521. the name, and find another unique name to your catalog.
  522.  
  523. The catalog reporting all the files in the directory is created
  524. in a FOR-IN-DO-LOOP. We create the list with double redirection
  525. operators >> in line 14. A new will be added for each new filename.
  526. Preceding each filename you find the command CALL TOA.
  527. If you are using a MS DOS version earlier than 3.3 you must
  528. use COMMAND /c to run a batch file from within another. You
  529. can't use CALL.
  530.  
  531. When you run CATALOG.BAT MS DOS executes the CALL CATALOG in line 15.
  532. The format of the command CALL is as follows:
  533. CALL <command file> parameters
  534. But what exactly does CALL TOA?
  535. It starts TOA.BAT program and accepts file name as a parameter.
  536. The parameter is a file name in the directory. TOA.BAT try to
  537. copy files A:. If TOA.BAT can't make it, the program asks for
  538. a new diskette i A: and you must try again. Notice that TOA.BAT
  539. in the third line 3 pass CATALOG.BAT. We don't need to copy
  540. the temporary and specific report.
  541.  
  542. ■    TOA.BAT creates and starts CATALOG.BAT. CATALOG.BAT starts
  543.      TOA.BAT successive before each file name. When the last file
  544.      has been copied, we are back to the starting point. The temporary
  545.      file CATALOG.BAT is erased, the batch file ends and returns
  546.      to MS DOS.
  547.  
  548. ■    I use %0 when the program is asked to call it self. If
  549.      you rename the file TOA.BAT to CHINABOX.BAT, you can
  550.      type CATALOG.BAT and read CALL CHINABOX FILE NAME in
  551.      CATALOG.BAT.
  552.  
  553. ■    The at sign @ and the command CALL works only in MS DOS
  554.      versions 3.3 and later. The command XCOPY was new in MS
  555.      DOS 3.2. If you don't use XCOPY you have to delete all
  556.      files with 0 byte before you execute the batch file.
  557.  
  558. Method number three is the simplest. With number one you had
  559. to remember files that you wanted to copy. TOA.BAT created a
  560. file called CATALOG.BAT that kept a record of all the files
  561. in the directory. In this method we will use the archive
  562. attribute as an invisible label attached to each file.
  563.  
  564. By turning off the archive attribute with the command ATTRIB +A
  565. *.*. XCOPY/m copy only those files where the attribute is not set.
  566. Think of the attribute as a label where it's written: "must be
  567. copied". All the files have now got such a memo.
  568. Then I start XCOPY: XCOPY *.* A:/m.
  569.  
  570. After a while the diskette is full and XCOPY stops doing the job
  571. without asking for a new diskette. That's silly, but the switch
  572. /m is handy. The /m switch copies source files that have their
  573. archive file attributes set. the /M switch turns off archive file
  574. attributes in thefiles specified in source.
  575.  
  576. We insert a new diskette, repeats the command and
  577. XCOPY carries on.
  578.  
  579. This is possible because the command  XCOPY /m turns off
  580. the archive attribute during execution, but only those files
  581. that you really copy. Imagine how XCOPY writes on each file:
  582. "this is done" and attach the memos to the copied files.
  583.  
  584. As you can see, it's easy to continue. Repeat the command
  585. (press F3) when you have changed the diskette.
  586. XCOPY will continue coping files.
  587.  
  588. When the batch is done turn on the archive attribute, for
  589. the cause of safety.
  590.  
  591. The next batch file, CPTOA.BAT, contains these commands:
  592. The program draws the maximum benefit from XCOPY'S little
  593. known and often unused ability to provide exit-status values
  594. that you can test using ERRORLEVEL codes. (See ERRORLEVEL codes
  595. in chapter 27 in this book.)
  596.  
  597. CPTOA.BAT
  598. =========
  599.  
  600. @ECHO OFF
  601. IF %1.==. GOTO END
  602. IF %a%X==X ATTRIB +A *.*
  603. SET A=some
  604. :AGAIN
  605. XCOPY *.* %1 /m/w
  606. IF ERRORLEVEL 4 GOTO AGAIN
  607. IF ERRORLEVEL 2 GOTO END
  608. ATTRIB +A *.*
  609. SET A=
  610. :END
  611. IF %1.==. ECHO %0 A: or ?
  612.  
  613.  
  614. To start the program type drive A: or B:
  615. on the PROMPT command line. This is possible because
  616. Initialization error occurred.  There is not
  617. enough disk space, and produces and errorlevel 4.
  618. XCOPY has stopped to copy files, but there are still more left.
  619. That's why the MS DOS batch file is asked to go to :AGAIN in
  620. line 5. XCOPY starts.
  621.  
  622. XCOPY/m/w means that the program is waiting for an keyboard
  623. input so you can change the diskette. This is how we avoid an
  624. extra command PAUSE.
  625.  
  626. If you want to terminate you can easily use Ctrl-C which
  627. provides ERRORLEVEL 2. May be something is wrong or you
  628. have no formatted diskettes left. But I assume that you
  629. plan to carry on, so no steps are taken to restore
  630. the archive attributes. This is the reason why I create
  631. a new system variable in the line SET A=something. If you
  632. stop the execution, the system variable A will still be
  633. there. When MS DOS encounters %A% in line number 2 ATTRIB
  634. is not executed. In other words:  CPTOA.BAT continue where
  635. it stopped. The line SET A= at the end removes A
  636. so you can run the batch file in other directories.
  637. CPTOA.BAT must be in PATH.
  638.  
  639. Chapter 2: One day you will regret that you didn't take backup seriously
  640. ========================================================================
  641.  
  642. After several years as a PC user I have produced thousands of
  643. files. Most of them I keep saved at my hard disk or on diskettes.
  644. Not everything is important, but experience has taught me that
  645. it is difficult to say anything about the future. One day I will
  646. need the note I wrote in the summer 1987. A good backup
  647. makes it easy to update and keep a record of thousands of files.
  648. To an average user with a homeoffice like the one I've got, I will
  649. recommend a system, a routine, which is based on a three generations
  650. backup.
  651.  
  652. During a period of three year I have used a routine that
  653. backup the hard disk every month. It's up to you how you will
  654. adapt the routine to your own needs. May be it's sufficient to
  655. make a main copy once a year. As I have mentioned, my system is based
  656. on a main copy every month. The main copy I used every month, took
  657. care of the files I wanted to erase. I didn't want them be included
  658. in my backup and then eventually restored.
  659.  
  660. In addition to the main copy, I backed up parts of the files every week.
  661. As with the main copy I erased the files from this partial copy that I
  662. didn't want to keep for just a short period.
  663.  
  664. Additionally I assign the value 0 to the place where the daily
  665. copy is kept, so it's kept to a minimum concerning diskettes.
  666. My daily backup was performed once and sometimes twice a day,
  667. and should only contain a few files so I didn't use the whole day
  668. to backup.
  669.  
  670. I wanted to make an automatic routine of the backup job.
  671. You all know how easy it is to skip or forget boring backups,
  672. especially when your system has functioned without problems for
  673. months or may be years. But one day, sooner and later, your
  674. computer will have problems, it will stop working and you may
  675. face really problems with getting data from your hard disk.
  676. When it comes to losing my work I am a coward, I don't take risks.
  677. I want to run a safe system.
  678.  
  679. I decided that backup should be an integrated part of my daily
  680. upstart. AUTOEXEC.BAT is the only batch file I have to
  681. execute every day.
  682. You should also backup your files as your last thing to do
  683. every evening. Fires usually starts at night, or water leakage.
  684.  
  685. Below I present a way to manage your backup, a system I have
  686. tested for years. You will probably find it detailed, but it
  687. works and it takes good care of your important data.
  688. The batch file was written some years ago and is related to
  689. earlier versions of MS DOS than 6.0.
  690.  
  691. The batch file uses the commands BACKUP, RESTORE, GETMONTH,
  692. GETDAY, DOW and call other batch programs. In your MS DOS manual
  693. you will find details upon how BACKUP and RESTORE works.
  694. The batch file uses three different switches: /s indicates
  695. that you want to copy subdirectories, /a that you add the
  696. files to be backed up to those already on the backup disk and
  697. do not erase saved files on the backup disk. /m back up only
  698. those files that have changed since the last backup.
  699.      
  700. Run EDLIN or EDIT from the command prompt and specify the name
  701. SECURITY.FIL. I myself prefer Qedit as an editor to write my batch
  702. files. It provides many features that make batch programming
  703. easier and faster. Be accurate when you create your batch file.
  704. All files must be in the same directory, for example DOS.
  705.  
  706. Comments on the files below:
  707. ----------------------------
  708.  
  709. 1) Don't miss spaces! When the files have been saved, see to that
  710. DEBUG resides in the DOS directory and type DEBUG<DATES.SCR.
  711. After a while you have three new programs.
  712.  
  713. 2) Add the batch file BCOPY.BAT to your AUTOEXEC.BAT and call
  714. it with the command COMMAND /c BCOPY.
  715. If you use MS DOS version 3.30 or newer you can write
  716. CALL BCOPY.
  717.  
  718. 3) The main program SECURITY.BAT contains the logic
  719. The only changes you have to do is decide the directories
  720. and files you want to be backed up.
  721.  
  722. 4) The file SETCOPY.FIL contains the parameter used by the main
  723. program.
  724.  
  725.  
  726. SECURITY.FIL
  727. ============
  728.  
  729. GETDAY
  730. IF ERRORLEVEL 2 GOTO start
  731. GOTO BCOPY
  732. :start
  733. IF ERRORLEVEL %daycopy% GOTO BCOPY
  734. GOTO notcopy
  735. :BCOPY
  736. GETMONTH
  737. IF ERRORLEVEL %maincopy% GOTO maincopy
  738. DOW
  739. IF ERRORLEVEL %partcopy% GOTO partcopy
  740. GETDAY
  741. IF ERRORLEVEL %daycopy% GOTO daycopy
  742. GOTO end
  743. :maincopy
  744. ECHO  * * * THE MAIN COPY * * *
  745. ECHO ------------------
  746. ECHO Insert diskettes for  * * * THE MAIN COPY * * * (1. day of the month)
  747. PAUSE
  748. BACKUP C:\DEASE B: /s
  749. BACKUP C:\DATATIME B: /s
  750. BACKUP C:\CATALOG B: /s
  751. BACKUP C:\SKPLUS B:
  752. BACKUP C:\BATCH B:
  753. IF %maincopy% == 12 set newcopy=1
  754. IF %maincopy% == 11 set newcopy=12
  755. IF %maincopy% == 10 set newcopy=11
  756. IF %maincopy% ==  9 set newcopy=10
  757. IF %maincopy% ==  8 set newcopy=9
  758. IF %maincopy% ==  7 set newcopy=8
  759. IF %maincopy% ==  6 set newcopy=7
  760. IF %maincopy% ==  5 set newcopy=6
  761. IF %maincopy% ==  4 set newcopy=5
  762. IF %maincopy% ==  3 set newcopy=4
  763. IF %maincopy% ==  2 set newcopy=3
  764. IF %maincopy% ==  1 set newcopy=2
  765. set maincopy=%newcopy%
  766. GOTO end
  767. :partcopy
  768. ECHO  * * * THE PART COPY * * *:
  769. ECHO ----------------------------
  770. ECHO Insert diskettes for  * * * THE PART COPY * * * (every friday)
  771. PAUSE
  772. BACKUP C:\DEASE B: /s /l:C:\REPORT\PARTCOP1.LOG
  773. BACKUP C:\BATCH B:
  774. BACKUP C:\DATAKURS B: /s /l:C:\REPORT\PARTCOP3.LOG
  775. BACKUP C:\CATALOG B: /l:C:\REPORT\PARTCOP4.LOG
  776. ECHO Insert the diskette(s) for DAILY COPY (all files erased)
  777. FORMAT A:
  778. GOTO end
  779. :daycopy
  780. ECHO  * * * THE DAILY COPY * * *:
  781. ECHO --------------------
  782. ECHO Insert diskette(s) for  * * * THE DAILY COPY * * * (every morning)
  783. PAUSE
  784. BACKUP C:\DEASE B: /s /a /m
  785. :end
  786. GETDAY
  787. IF ERRORLEVEL  1 set daycopy=2
  788. IF ERRORLEVEL  2 set daycopy=3
  789. IF ERRORLEVEL  3 set daycopy=4
  790. IF ERRORLEVEL  4 set daycopy=5
  791. IF ERRORLEVEL  5 set daycopy=6
  792. IF ERRORLEVEL  6 set daycopy=7
  793. IF ERRORLEVEL  7 set daycopy=8
  794. IF ERRORLEVEL  8 set daycopy=9
  795. IF ERRORLEVEL  9 set daycopy=10
  796. IF ERRORLEVEL 10 set daycopy=11
  797. IF ERRORLEVEL 11 set daycopy=12
  798. IF ERRORLEVEL 12 set daycopy=13
  799. IF ERRORLEVEL 13 set daycopy=14
  800. IF ERRORLEVEL 14 set daycopy=15
  801. IF ERRORLEVEL 15 set daycopy=16
  802. IF ERRORLEVEL 16 set daycopy=17
  803. IF ERRORLEVEL 17 set daycopy=18
  804. IF ERRORLEVEL 18 set daycopy=19
  805. IF ERRORLEVEL 19 set daycopy=20
  806. IF ERRORLEVEL 20 set daycopy=21
  807. IF ERRORLEVEL 21 set daycopy=22
  808. IF ERRORLEVEL 22 set daycopy=23
  809. IF ERRORLEVEL 23 set daycopy=24
  810. IF ERRORLEVEL 24 set daycopy=25
  811. IF ERRORLEVEL 25 set daycopy=26
  812. IF ERRORLEVEL 26 set daycopy=27
  813. IF ERRORLEVEL 27 set daycopy=28
  814. IF ERRORLEVEL 28 set daycopy=29
  815. IF ERRORLEVEL 29 set daycopy=30
  816. IF ERRORLEVEL 30 set daycopy=31
  817. IF ERRORLEVEL 31 set daycopy=32
  818. ECHO set maincopy=%maincopy%  > setcopy.fil
  819. ECHO set partcopy=%partcopy% >> setcopy.fil
  820. ECHO set daycopy=%daycopy% >> setcopy.fil
  821. :notcopy
  822.  
  823.  
  824. BCOPY.BAT
  825. =========
  826.  
  827. @ECHO OFF 
  828. REM BCOPY.BAT
  829. CLS 
  830. COPY setcopy.fil+security.fil security.bat >nul
  831. security.bat
  832.  
  833. SETCOPY.FIL
  834. ===========
  835. set maincopy=8
  836. set partcopy=5
  837. set daycopy=25
  838.  
  839. BCOPY.BAT and SETCOPY.FIL should be in root directory.
  840. The contents of SETCOPY.FIL must be adjusted every month.
  841. Decide on which weekday and date you want the routine to
  842. begin. It's important that the computers date is correct.
  843.  
  844. DATES.SCR 
  845. =========
  846.  
  847. n GETMONTH.com
  848. a 100 
  849. mov ah, 2a 
  850. int 21 
  851. mov al, dh 
  852. mov ah, 4c 
  853. int 21 
  854.  
  855. rcx 
  856.  
  857. n GETDAY.com
  858. a 100 
  859. mov ah, 2a 
  860. int 21 
  861. mov al, dl 
  862. mov ah, 4c 
  863. int 21 
  864.  
  865. rcx 
  866.  
  867. n DOW.com
  868. a 100 
  869. mov ah, 2a 
  870. int 21 
  871. mov ah, 4c 
  872. int 21 
  873.  
  874. rcx 
  875. q
  876.  
  877. BACKUP1.BAT
  878. ===========
  879.  
  880. @ECHO OFF
  881. REM BACKUP1.BAT
  882. IF /%1==/ GOTO SHOW
  883. REM %1 is not empty,no problems will occur when strings are compared
  884. IF %1==1 CD\
  885. IF %1==1 BACKUP C: A: /s
  886. IF %1==1 GOTO END
  887. IF %1==2 CD\
  888. IF %1==2 BACKUP C: A: /m
  889. IF %1==2 GOTO END
  890. IF %1==3 CD\
  891. IF %1==3 BACKUP C: A: /m /a
  892. IF %1==3 GOTO END
  893. REM If %1 is true, the program moves to the end
  894. REM Display an error message
  895. ECHO YOU HAVE WRITTEN AN INVALID SWITCH!!
  896. :SHOW
  897. ECHO TYPE A 1 FOR A TOTAL BACKUP
  898. ECHO TYPE A 2 FOR A CERTAIN CHOICE BACKUP
  899. ECHO TYPE A 3 FOR A CERTAIN CHOICE BACKUP THAT WILL BE ADDED TO AN EXISTING DISK
  900. GOTO END
  901. :END
  902.  
  903. The batch file is an unfinished example which can handle
  904. many parameters or none at all. I leave it to you my reader
  905. to complete it? It's a fine study to learn how IF sentences
  906. can enhance your batch programs and make them more flexible.
  907.  
  908. Chapter 3: How to make a choice about how a batch should proceed?
  909. =================================================================
  910.  
  911. This is a classical problem and has existed from the very
  912. beginning. Last summer a friend of mine called me.
  913. He needed help. How can I write a batch file (dos 5) which
  914. will run a program with a command line switch if the command
  915. line switch is entered when running
  916. the batch file, but otherwise NOT run the program.
  917.  
  918. Example: Program GOGO.EXE can be run with or without a
  919. command line option. My batch file do.bat is to run GOGO
  920. if the command to run DO.BAT contains the option, otherwise
  921. the batch file is just to end without doing anything.
  922.  
  923. Below is his solution to the problem, but it doesn't work
  924. very good, unfortunately.
  925.  
  926. DO.BAT
  927. ======
  928.  
  929. :: DO.BAT
  930. :start
  931. :: IF parameter for gogo entered, run gogo
  932. IF .%1 == .do-gogo gogo %1
  933. :end
  934.  
  935. Change do-gogo to whatever the parameter is.  Be sure to include the period
  936. (or some character) on BOTH sides of the =='s.  Otherwise you will
  937. get a syntax error when ran with no parameter.
  938.  
  939.  
  940. I suggested he should create a batch file like DO1.BAT.
  941.  
  942. DO1.BAT
  943. ======= 
  944.  
  945. IF "%1"=="" GOTO NOTE
  946.  
  947. C:\PATH\GOGO.EXE /%1
  948. GOTO END
  949.  
  950. :NOTE
  951. CLS
  952. ECHO.
  953. ECHO.
  954. ECHO.
  955. ECHO    You must enter a command line switch.
  956. ECHO    Do NOT add the leading slash (/)
  957. ECHO.
  958. ECHO.
  959. ECHO    Correct Example:
  960. ECHO.
  961. ECHO    DO F
  962. ECHO.
  963. ECHO    Incorrect Example:
  964. ECHO.
  965. ECHO    DO /F
  966. ECHO.
  967. ECHO.
  968.  
  969. PAUSE
  970.  
  971. :END
  972.  
  973. You can see how to change it to include the leading slash, I'm
  974. sure.
  975.  
  976. This is a third example:
  977.  
  978. DO2.BAT
  979. =======
  980.  
  981. If %1.==. GOTO end
  982. GOGO.EXE %1
  983. :END
  984.  
  985. And at last a fourth example:
  986.  
  987. DO3.BAT
  988. =======
  989.  
  990. Put the following at the top of your batch file, after the @ECHO OFF:
  991.  
  992. IF '%1'='<option_name_for_gogo>' goto go
  993.  
  994. Then put the following in any convenient location after that:
  995. :go
  996. gogo %1
  997. goto end
  998. <any other commands you want here>
  999. :end
  1000.  
  1001. When you run do.bat the command is do <option_name_for_gogo>
  1002.  
  1003. @ECHO OFF
  1004. IF (%1) == () goto syntax
  1005. IF (%2) == () goto syntax
  1006. gogo
  1007.  
  1008. :syntax
  1009. echo.
  1010. echo YOU MUST ENTER COMMAND OPTIONS TO RUN GOGO.EXE
  1011. echo.
  1012.  
  1013.  
  1014. Chapter 4: Edit a batch program
  1015. ===============================
  1016.  
  1017. Over a year ago, someone offered the following batch file, and I
  1018. have found it to be indispensable. Like most others users, I keep all my
  1019. batch files in one directory, and I used to have to type in the entire
  1020. directory\pathname\filename.ext or change drives\directories just to
  1021. edit a given batch file. With this BAT.BAT file placed in your batch
  1022. file directory, you can edit any given batch file from any
  1023. drive/directory. All that is required is to enter BAT FILENAME.
  1024. No extensions are necessary.
  1025.  
  1026. BAT.BAT
  1027. =======
  1028. @ECHO OFF
  1029. :: REM  BAT.BAT
  1030. :: REM  I can edit ANY batch file in D:\BATCH from anywhere in any drive
  1031. cls
  1032. IF %1 .==. goto NOT
  1033. q d:\batch\%1.bat
  1034. goto END
  1035. :NOT
  1036. q d:\batch\
  1037. :END
  1038. cls
  1039.  
  1040. Notice that I use QEdit, and it is also in my path......
  1041.  
  1042. I really appreciate that people share batch files.
  1043. Users that are new to computers often like to experiment
  1044. with writing batch files. It's exciting when you can help
  1045. someone else with a batch due to the fact that applications
  1046. are scary enough for them.
  1047.  
  1048.  
  1049. Chapter 5: Batch pipe problem
  1050. =============================
  1051.  
  1052. Now and then I get questions about different batch problems.
  1053. A frequently asked question is how we can run a batch file
  1054. with the command MORE. Is there a way to get around " | more"
  1055. not working to scroll output?
  1056.  
  1057. @ECHO OFF
  1058. for %%f in (%2) do find /i "%1" %%f
  1059.  
  1060. Yes, each 'find' command is a completely different command,
  1061. opening and closing the pipes.
  1062.  
  1063. Here's how I would do it in regular dos.
  1064.  
  1065. for %%f in (%2) do find /i "%1" %%f >> temp.x
  1066. type temp.x | more
  1067.  
  1068. Considering each 'find' operation is a separate command, the
  1069. append '>>' symbol is necessary or else you only get the results
  1070. of the last file in the list.
  1071.  
  1072.  for %%f in (%2) do find /i "%1" %%f
  1073.  
  1074. The problem is that the MORE filter only works with one instance of
  1075. STDOUT output at a time. If the output from any ONE of the FIND
  1076. statements would make the screen scroll, you'd find that the filter does
  1077. work--for that single FIND statement only.
  1078.  
  1079. Try attacking this from another angle--direct all of the STDOUT output
  1080. into a text file, then pass that text file through the MORE filter:
  1081.  
  1082. del txt
  1083. for %%f in (%2) do find /i "%1" %%f >> txt
  1084. type txt | more
  1085.  
  1086. If you don't want the "---<filename>" lines in your output, change the
  1087. FOR..IN..DO loop to read
  1088.  
  1089. for %%f in (%2) do find /i "%1"<%%f>>txt
  1090.  
  1091. Yea, it's working nicely with both suggestions.
  1092.  
  1093. Most people are aware of the '>' redirect command. But, they
  1094. don't know that they can append text also with '>>'. Nice!
  1095.  
  1096. I'll try modifying it also to get rid of the  '---<filename>'
  1097. header.
  1098.  
  1099. @ECHO OFF
  1100. for %%f in (%2) do find /i "%1" %%f
  1101.  
  1102. I think it's because you only get one command
  1103. after "do", in this case it's find. "more"
  1104. gets lost in the shuffle.
  1105. This is one of the serious drawbacks to DOS,
  1106. as it's fairly simplistic as far as operating
  1107. systems go.
  1108. As a test, make a batch file with -just- find
  1109. followed by more, like:
  1110.  
  1111. find "hello" txtfile.txt | more
  1112.  
  1113. ...to see if it works there.  If not, then either
  1114. "find" or "more" is the problem, otherwise it's "do".
  1115.  
  1116. In any case, you may have to output your stuff to
  1117. a file first, then "more" that to the screen.
  1118.  
  1119. SEARCH.BAT
  1120. ==========
  1121.  
  1122. @ECHO OFF
  1123. FOR %%f IN (%2) DO FIND /i "%1" %%f
  1124.  
  1125.  
  1126. SEARCH1.BAT
  1127. ===========
  1128.  
  1129. @ECHO OFF
  1130. FOR %%f IN (%2) DO FIND /i "%1" %%f >> temp.x
  1131. TYPE temp.x | MORE
  1132.  
  1133.  
  1134. SEARCH2.BAT
  1135. ===========
  1136.  
  1137. @ECHO OFF
  1138. FOR %%A IN (*.*) DO FIND /i "%1" %%A >> TEMP.X
  1139. TYPE TEMP.X | MORE
  1140.  
  1141.  
  1142. SEARCH3.BAT
  1143. ===========
  1144. @ECHO OFF
  1145. FOR %%A IN (*.*) DO FIND /i "%1" %%A >> TEMP.X
  1146. TYPE TEMP.X | MORE
  1147. DEL TEMP.X
  1148.  
  1149.  
  1150. Chapter 6: Searching for files is often time consuming
  1151. ======================================================
  1152.  
  1153. In this chapter we are going to look closer at
  1154. different ways to look for files and specific
  1155. text strings. If you are working with large data
  1156. files, searching for certain text strings in giga-
  1157. bytes of information you probably know how time-
  1158. consuming it is and how much time it takes to find
  1159. the files you are looking for. Every day I use different
  1160. methods to find files where I have stored essential
  1161. information.
  1162. Normally I work in a Windows environment. Windows provides
  1163. excellent methods to execute a search, find files, look
  1164. for special documents that are stored some place on your
  1165. hard disk. Still I prefer to search in plain MS DOS. It's
  1166. faster, especially when I'm searching through hundreds,
  1167. may be thousands of different files.
  1168.  
  1169. Below is one of my favourites. I call it LAF.BAT
  1170. (List all files).
  1171.  
  1172. The logic in the batch file is simple, but with great
  1173. functionality. I keep it in my batch directory and has defined
  1174. the directory in my path. I can use it all over the hard disk.
  1175. The syntax is very easy:
  1176.  
  1177. LAF search string
  1178.  
  1179. LAF.BAT
  1180. =======
  1181.  
  1182. @ECHO OFF
  1183. CHKDSK/V|FIND "%1"
  1184.  
  1185. In the first line I turn off the command ECHO. I don't
  1186. want to view the execution of the batch file.
  1187. I'm only interested in the report.
  1188. In the second line I use the options CHKDSK offers and
  1189. /v that displays the name of each file in every directory
  1190. as the disk ischecked.
  1191. The list piped to the MS DOS command FIND. FIND looks
  1192. through the list searching for the specific string you
  1193. want to search for. We add the switch /i to the command
  1194. FIND, so we don't have to worry about if the search is
  1195. case-sensitive or not. If you ignore /i, the specified
  1196. string of text must be written in capital letters. This
  1197. is how MS DOS will display it.
  1198.  
  1199. I hope you enjoyed it. Let's take a look at other batch
  1200. programs. Let's take a closer look at the smart file below.
  1201.  
  1202. ALL.BAT
  1203. =======
  1204.  
  1205. ECHO OFF
  1206. :START 
  1207. IF "%1"==" " GOTO END
  1208. CLS 
  1209. ECHO           *** Lines in *.bat that contain %1 ***
  1210. ECHO  
  1211. FOR %%p IN (*.bat) DO FIND /c "%1" %%p 
  1212. ECHO  
  1213. PAUSE 
  1214. SHIFT 
  1215. GOTO START 
  1216. :END
  1217.  
  1218.  
  1219. The batch file searches for a specific string of text in
  1220. a specified file or files. The name of the files you are
  1221. looking for is specified in the batch file. You are allowed
  1222. to type several parameters. This method is useful if you
  1223. want to search within the same group of files. In the example
  1224. below, I search through all the batch files.
  1225.                                           
  1226. Both the command FOR and SHIFT is used in the batch file to
  1227. search for more than one string i several files. Below is
  1228. a line by line description.
  1229.  
  1230. _    Line 1 turns ECHO off
  1231.  
  1232. _    The label :START sets the beginning of the command sequence
  1233.      you need to repeat. The label is the destination for the command
  1234.      in GOTO on line 11.
  1235.  
  1236. _    The command IF controls whether the parameter is an empty
  1237.      parameter. If it is, the condition is met and the command
  1238.      GOTO will make MS DOS move on to the end of the batch file
  1239.      at line 12.
  1240.  
  1241. _    Line 4 clears the screen and place the prompt at the top of
  1242.      the screen.
  1243.  
  1244. _    The command ECHO in line 5 displays a message to the user.
  1245.      Line 6 displays a blank line.
  1246.  
  1247. _    The command FOR searches every file with the suffix BAT, and
  1248.      displays the amount of lines with the string (" %1 "),
  1249.      which is the first specified parameter in the batch file All.BAT
  1250.  
  1251. _    As line 6 line 8 displays a blank line.
  1252.  
  1253.  
  1254. -    Suspends processing of a batch program and displays a
  1255.      message that promptsthe user to press any key to continue.
  1256.      You can use this command only withinbatch programs.
  1257.  
  1258. _    The command SHIFT in line 10 moves parameter one step to the left.
  1259.  
  1260. _    The command GOTO returns MS DOS to the label :START.
  1261.  
  1262. _    The label :END identifies the end of the batch file.
  1263.      (the destination for the command GOTO i line 3).
  1264.  
  1265. To run ALL.BAT you must write the text, the words, the strings you
  1266. are looking for as parameters. Notice! The command FIND is
  1267. case-sensitive.
  1268.  
  1269. Say you want to search for the words ECHO, COPY and
  1270. message.
  1271.      Use the following syntax:
  1272.      
  1273.      ALL ECHO COPY melding
  1274.  
  1275. ALL clears screen, searches the suffix BAT for the word ECHO,
  1276. displays the amount of lines and stops.
  1277. You are asked to press any key and the batch file carry on and
  1278. searches the files for the word copy and displays the result.
  1279. The batch process repeats until all the words you have specified
  1280. have been found.
  1281.  
  1282. /c displays the amount of lines containing the given string
  1283. i each file. The switch is one of the command FIND'S many
  1284. options.
  1285. To end the batch file you must press CTRL-C and answer Y for
  1286. Yes.
  1287.  
  1288. FIND.BAT
  1289. ========
  1290.  
  1291. Somewhere on your hard disk you remember that one of your most
  1292. important files is located, but exactly where is the question?
  1293. FIND.BAT use the switch /v belonging to the command CHKDSK.
  1294. The switch displays a list of all existing files on the hard disk.
  1295. If redirects the list to a file you can produce a fast search with
  1296. with the command FIND.
  1297. First time you run FIND, the program will create a file
  1298. called CATALOG.DAT in the root directory. Below is an example
  1299. how you can use it.
  1300.  
  1301. C:\>FIND BAT
  1302. The execution of the command will make a list of all batch files
  1303. on your hard disk. Notice the FIND.BAT doesn't take wildcards like
  1304. * or ?. In addition to search for files you can use FIND.BAT to
  1305. check if there are more copies of the same file in different
  1306. directories. All you have to do is to type the file name and
  1307. FIND will immediately list all file names that match. The
  1308. disadvantage is that FIND can't automatically register changes
  1309. on your hard disk. To upgrade \CATALOG.DAT you just have to use
  1310. the parameter new in the search string. If you are depending on
  1311. an upgraded list or maybe you need to search only once, you can
  1312. use the technique this way.
  1313.  
  1314. CHKDSK /v | FIND ".BAT"
  1315.  
  1316. You redirect the outprint directly to FIND that will display only
  1317. the lines containing the string "BAT". Since it takes at least the
  1318. same time to run the command CHKDSK it will always pay to use
  1319. \CATALOG.DAT if you intend to repeat the search. Users that run
  1320. the version 4.0 of MS DOS it's much easier. The MS DOS command
  1321. FIND has been improved so you can search for files all over your
  1322. hard disk. The command FIND *.BAT will list all batch files, but
  1323. not so fast as our batch file.
  1324.  
  1325. FIND.BAT
  1326. ========
  1327. @ECHO OFF
  1328. IF NOT "%1 "==" " GOTO OK
  1329. :INSTR
  1330. ECHO 
  1331. ECHO Command
  1332. ECHO FIND {string} [new]      Find the file name containing the {string}
  1333. ECHO                {string} must be UPPER case
  1334. ECHO                The option NEW updates the catalog.
  1335. GOTO END
  1336. :OK
  1337. IF "%2"=="ny" GOTO CHKDSK
  1338. IF NOT "%2"==" " GOTO INSTR
  1339. IF EXIST \CATALOG.DAT GOTO FIND_FILE
  1340. :CHKDSK
  1341. ECHO Updates the catalog....
  1342. CHKDSK /v >\CATALOG.DAT
  1343. ECHO A
  1344. :FINN_FILE
  1345. FIND "%1" \CATALOG.DAT
  1346. :END
  1347.  
  1348. _    Line 2 skips the instructions if you specify at least
  1349.      one parameter.
  1350.  
  1351. _    Line 4-8 displays instructions on how to use the batch file.
  1352.  
  1353. _    Line 11 executes CHKDSK if the parameter NEW is specified.
  1354.  
  1355. _    Line 13 jumps directly to the search routine if the file
  1356.      \CATALOG.DAT exists.
  1357.  
  1358. _    Line 16 runs the command CHKDSK and redirects the outprint
  1359.      to the file \CATALOG.DAT.
  1360.  
  1361. _    Line 17 blanks the outprint from line 15.
  1362.  
  1363. _    Line 19 look for the specified string in the file \CATALOG.DAT
  1364.  
  1365. LOOKFOR.BAT
  1366. ===========
  1367.  
  1368. ECHO off
  1369. CLS
  1370. ECHO           ***LINES I %1 CONTAINING %2***
  1371. ECHO
  1372. for %%p in (%1) do find "%2" %%p
  1373.  
  1374. To show all lines containing a certain string LOOKFOR.BAT can
  1375. point out the file you must search and the string you must specify.
  1376. Each line containing the string in the file, will be displayed.
  1377. Wildcards are allowed to search in groups of files.
  1378.  
  1379. The job is done in the last line of the batch file. The
  1380. previous line clears the screen and displays a title.
  1381. The command FOR in line 5 makes the command FIND
  1382. be repeated for each file name stated in your first parameter
  1383. when you type your LOOKFOR.BAT command. The command FIND looks
  1384. for the string  you specified as the second parameter. To display
  1385. each line containing the word "NOT" in all files in
  1386. current directory you must type:
  1387.  
  1388. LOOKFOR C:\SHAREWARE\PLENTY??.* NOT
  1389.  
  1390. Chapter 7: Customizing the command dir
  1391. ======================================
  1392.  
  1393. Next to the command COPY DIR is maybe the most common
  1394. command you use. Every day we need to list directories,
  1395. find files with specified names or file extensions.
  1396. The command DIR has really improved since the earliest
  1397. MS DOS versions and provides several useful different
  1398. options. Very often you find yourself listing directories
  1399. containing  directories with hundreds of files and it's
  1400. impossible to read the screen. The switch /p is very handy.
  1401. When you need to look at your files in wide format the switch
  1402. /w provides as many as five file names or directories. Of course,
  1403. the command DIR offers several useful possibilities, but the
  1404. human nature needs changes and searches always for new ways to do
  1405. things. The imagination and the creativeness start working. There
  1406. will always be people that are looking for that special command
  1407. that does not exist. With our batches we can create them.
  1408.  
  1409. How is it possible to list all files in a directory
  1410. except those that have got a specific file extension?
  1411. The problem has different solutions. For example you can
  1412. write a program like
  1413.  
  1414. LAFUEXT.BAT
  1415. ===========
  1416. @ECHO OFF
  1417. DIR | FIND /i /v %1 > dirfile
  1418. TYPE dirfile | more
  1419.  
  1420. (Lists all file without the extension.)
  1421.  
  1422. The program starts as usual with turning ECHO OFF. DIR
  1423. lists the directory and redirects the list to FIND. FIND has
  1424. offers the following options: /i means that FIND will be case
  1425. sensitive. /v displays all lines in the file not containing
  1426. the specified string.
  1427. The result is redirected to a file we call "dirfile",
  1428. and the command TYPE displays the contents of dirfile screen by
  1429. screen. The command MORE one screen of information at a time.
  1430.  
  1431. We can also do it in another way.
  1432.  
  1433. LAFUEXT1.BAT
  1434. ============
  1435. @ECHO OFF
  1436. IF %1. ==. GOTO END
  1437. DIR | FIND "%1" /v
  1438. :END
  1439.  
  1440. In this example we solve the problem with a little help
  1441. from a simple IF-sentence. If %1 contains a file extension
  1442. the program jumps to :END. The rest will be displayed
  1443. without the specific string.
  1444.  
  1445. We can also solve the problem by using the command ATTRIB,
  1446. a command which is not very often used, and as a lot of batch
  1447. files offers excellent functionality.
  1448.  
  1449. LAFUEXT2.BAT
  1450. ============
  1451. @ECHO OFF
  1452. ATTRIB +h %1
  1453. DIR
  1454. ATTRIB -h %1
  1455.  
  1456. This is what happens:
  1457.  
  1458. ATTRIB puts the files with the specified extension to hidden.
  1459. DIR won't list  hidden files. The result is a list containing
  1460. all file except those with a specified file extension.
  1461.  
  1462. There is also a rather handy tool that is capable of
  1463. solving the task. You can use NO.COM together with
  1464. ordinary MS DOS commands.
  1465.  
  1466. NO.COM
  1467. ======
  1468.  
  1469. Copy the script file.
  1470.  
  1471.  NNO.ZIP
  1472.  E100 FC BB 03 00 BF D4 01 BE CC 01 33 C9 AD 86 CC AA FE C0 E2 FB 4B
  1473.  E115 75 F5 B9 FF FD BA 20 02 52 B4 3F CD 21 5F 72 60 8B F7 50 8B C8
  1474.  E12A B0 2A F2 AE 75 55 B0 0D F2 AE 87 F7 BB 00 01 B2 04 AC 3C 2A 72
  1475.  E13F 62 74 46 57 BF D2 01 B9 40 00 8A E1 F2 AE 5F 75 35 FE C1 2A E1
  1476.  E154 88 27 43 FE CA 75 E0 56 BE 00 01 AD 86 C4 8B D0 AD 86 C4 5E B1
  1477.  E169 02 D2 E0 D3 E0 D2 E2 D3 EA D0 E1 D1 EA D1 D8 E2 FA 86 C2 AA 8A
  1478.  E17E C4 AA 8A C2 AA EB B1 BF 20 02 58 33 D2 F7 D8 13 D2 F7 DA 33 DB
  1479.  E193 8B CA 8B D0 B8 01 42 CD 21 8B 0E CA 01 CC AC 3C 0A 75 FB AC 57
  1480.  E1A8 BF D2 01 B9 40 00 8A E1 F2 AE 5F 75 D0 FE C1 2A E1 86 E0 32 E4
  1481.  E1BD 8B 1E CA 01 03 D8 89 1E CA 01 E9 6C FF 00 00 30 0A 41 1A 61 1A
  1482.  E1D2 2B 2D
  1483.  G=100
  1484.  W220
  1485.  Q GXDPlus 1.0
  1486. *XXBUG20--00000422--18021994--964D7791------------------NO.ZIP
  1487. nI2g1--E++U+6++++e-HLxixSdE6++C+0+++4++++HYwiEoxBDJ1jGpBT51
  1488. vbSXSrFUM3
  1489. nJfukQwgWBXIf2DALmhKYfAqM98dZnCre9amvQbQL9EcaEXKjv0wcG97SK3zlWlTQJ
  1490. gn-
  1491. n6Uit3TeWLdIYp3oHYMq6aihqbB8-1rnCwrmStzCQYxN-aVg8wimUKo15HnLIcwjgk2-B
  1492. nVyAuuoQxULsDurSnjY32QvIJe6Tb-ba5pwisI5wEoKs5vq5k30DQt1kiJ42ByUH5XINY
  1493. nhe+-3XB1X-AtCOzLsLCV8oACf4E2VjRTfH7Pw-11iDmckq737qffY8a6bT2tCNtbb+6u
  1494. nXTL6WUq8S0z56SkGr973+cTQf6gdIioS1yRo00nbqonLvq4wFNWqb1zTPivsVyZFRJA
  1495. 9
  1496. nq1eMgzNoohhLCmtDgNDeN8eNwCyB-u0YZmYNDKjS8TmMykNX4d0RGgLDkQEkq
  1497. 3+IJQW9
  1498. nbveJNHKEBxzBnFb6o0rM4B1wJzItctDqmlHN9XIybPMrYA8VGNjsQvGr2DfS7bL7J1k
  1499. A
  1500. nyQT470PogHNgONaqHzO70uOriEZXQX9QiUd5AiH120-1ldG2keLnLQElSfkODAf1Q4
  1501. I-
  1502. nXdKdi2e6gH6B2JwiYGdYGgGOi62ojN5AAiIrhCk4ka4w7RqeWjAOED-YoohS4ly5uFcp
  1503. nwOR2GEBJikMZGqMlr9cCBwIslvGxY7pupIa+XGUs8JDrmfDEi-W3i7pFNkbZ1V+fpy
  1504. 3k
  1505. n0V1WmYVepzzYIYMuWxzm+j6qPIFP1Ile6UTXGz-6e+I6hCpWH+RmHuvp0LdXAe
  1506. OeqObA
  1507. npt3tLOLqE4bsW7sEDnnDkmXcZealpt4DYKHYjMXFyxg95q+PDvbtyHC3KO+Mk0U
  1508. CIqFY
  1509. n77OhkNKXMjoe3AjLcGpV6ALTmXtUuJDqU+hFEAjIkMIRvu6EBtSy98QaEfRJ2DWJy
  1510. UhE
  1511. nGkA23++0++U+OVtD5-lgExSr++++tE++++M+++-CHmt2HoDXtJ7EID-9n2
  1512. qpIj1nprDq
  1513. nxyLZsiI880oem0w40XbatCGL3miYJWHbZ8NYteIf70eYNSOY3VSY7WiY3SLb8dFYd0
  1514. cY
  1515. n7dRYtiQdt8Q-NNDnQrAHwp7+VWU2JyOJ73O+n2JcUgcfF-QY3U2h9IYh8cs38LOhG
  1516. Akh
  1517. nm+2vEY399wcnEA53pET6oU8P-+DVaHYt0WadCI-x0cZ+7hVMVOHG2e+vUCtJ8A
  1518. wgmE+u
  1519. n+eExhO6YBOwMu0uE+E-EGk203++I++6+0++++8UIpzPjLeI0++1U+U++-
  1520. U++++++++++
  1521. n+0++++++++++HYwiEoxBI2g-+VE+3++0++U+OVtD5-lgExSr++++tE
  1522. ++++M+++++++++
  1523. a+E+U++++mE6++2tD9YFDEp-9-EM++++++U+0+4U+++0Y+k++++
  1524. ++
  1525. *XXBUG Version 2.20 by Chad Wagner
  1526.  
  1527. Execute the following command DEBUG < NNO.ZIP and you have become
  1528. the happy owner of a new DOS tool. You have to be a registered user
  1529. of PKUNZIP.EXE for unpack the file. You will receive NO.COM and NO.DOC
  1530. which is a short user reference.
  1531.  
  1532. If you register your copy of the Run Batch Run Book
  1533. you will receive along with your order a companion disk
  1534. containing my enhanced DIR command XDIR.
  1535.  
  1536. Chapter 8: How can a batch program answer Y for yes
  1537. ===================================================
  1538.  
  1539. DELETE displays the following question when you executes
  1540. the command:
  1541.  
  1542. C:\> DEL *.*
  1543. All files i directory will be deleted!
  1544. Are you sure (Y/N)?
  1545.  
  1546. One line of a batch file can't be
  1547. executed until the previous line is DONE.  A batch file
  1548. that says DEL *.* and then Y will execute the DEL *.*
  1549. command and then when that's OVER WITH, THEN it'll execute
  1550. a Y command.  The Y doesn't do anything; isn't even READ by
  1551. DOS, until after the DEL command is FINISHED.  So by the
  1552. time DOS sees the Y, the DEL command is over and the Y will
  1553. get executed as a command.  So "Bad command or filename"
  1554. will be the result, unless you happen to have a program
  1555. named Y on your system.
  1556.  
  1557. A batch file is not a list of keystrokes that'll get typed
  1558. as if you were typing them at the keyboard. It's a list of
  1559. COMMANDS that get executed, one by one, separately from
  1560. each other, as if you were typing each one at each
  1561. successive C:\> prompt.  Having DEL *.* in a batch file
  1562. will have the exact same effect as typing DEL *.* at the
  1563. command line.  Regardless of what commands might be in the
  1564. batch file before or after.  A command line has to be
  1565. complete in and of itself, at the command line, in order
  1566. for it to be complete in a batch file.  The commands that
  1567. come before or after it don't affect it.  ECHO Y | DEL *.*
  1568. works in the batch file because it works at the command
  1569. line.
  1570.  
  1571. Now there's one exception, of course.  A program called a
  1572. keyboard stuffer.  There are several in existence.  PC
  1573. Magazine's KEY-FAKE and 4DOS's KEYSTACK, etc.  Such
  1574. programs stuff keystrokes into the keyboard buffer.  So
  1575. that the next program that executes, that wants a keystroke
  1576. or some keystrokes, will find that "you" have already
  1577. "typed" them (or so that program will THINK).  If you used
  1578. a keyboard stuffer to stuff a "Y" into the keyboard buffer
  1579. before your DEL *.* command in your batch file, then it
  1580. WOULD effect the DEL command, in contradiction to what I
  1581. said above.  The DEL command would find Y in the keyboard
  1582. buffer and think you typed it, because the previous command
  1583. in the batch file (the keyboard stuffer program) had put it
  1584. there before the DEL command executed.
  1585.  
  1586. It works the same way as ECHO Y | DEL *.* with a couple
  1587. exceptions.
  1588.  
  1589. 1.  It would work for darn near any program, instead of
  1590. only those that take input from what's called Standard
  1591. Input, like DEL does.  Because the | (pipe) symbol takes
  1592. the first program's Standard Output (the ECHO command
  1593. above would be sending a Y to Standard Output) and pipes it
  1594. as Standard Input to the program after the | symbol. So
  1595. DEL gets its Y from Standard Input. But some programs look
  1596. directly at the keyboard to get their input, instead of
  1597. using Standard Input. For such programs, the ECHO Y |
  1598. trick won't work, but a keyboard stuffer program will.
  1599.  
  1600. 2.  Since it doesn't involve redirection of Standard Input,
  1601. it works for programs that are going to want more input
  1602. than just what's stuffed.  If you used the ECHO X | PROGRAM
  1603. trick to send one keystroke to a program that wanted five
  1604. keystrokes, you'd have to reboot your computer. Because
  1605. the program would wait all day for its other four
  1606. keystrokes to come from the same location the first one had
  1607. come from!  No matter what you typed at the keyboard, it
  1608. would have no effect because the program had been more or
  1609. less told to ignore the keyboard!  Standard Input had been
  1610. redirected from the keyboard to the ECHO command. So the
  1611. ECHO command is the ONLY place that program is going to
  1612. take its input from, and the ECHO command only sent one
  1613. keystroke so that's all the program gets!  That program
  1614. will never do anything further so you have to reboot!
  1615.  
  1616. But a keyboard stuffer doesn't cause that problem because
  1617. it doesn't redirect Standard Input the way the | symbol
  1618. does. It just stuffs a keystroke (or several keystrokes)
  1619. into the place where Standard Input (or any other kind of
  1620. input) comes from the keyboard buffer.
  1621.  
  1622. So....the ECHO X | WHATEVER trick is good for some things,
  1623. but not all. And a batch file just simply can not do what
  1624. you were asking, without the help of a keyboard stuffer
  1625. program which you use to send the keystroke before you
  1626. execute the program that wants the keystroke not after
  1627. that program is finished.
  1628.  
  1629. From time to another you need to erase more than one directory.
  1630. This is very often a tedious job. Now your fantasy starts working.
  1631. You construct a useful batch. After a while you are in charge
  1632. of some useful tools. Ooops! Did I say in charge? Well, below I
  1633. will present to you a rather dangerous tool that may, if you
  1634. don't watch out, delete the total hard disk.
  1635.  
  1636. Let's start working. This is the basic lines.
  1637.  
  1638. ERASE.BAT
  1639. =========
  1640.  
  1641. @ECHO OFF
  1642. CLS
  1643. DEL *.*
  1644.  
  1645. When you run the batch program you have to
  1646. answer Y/N. If you have planned to erase all the
  1647. files in the directory, this turn out to be a rather
  1648. heavy job. We don't want the warning. We want action:
  1649. The directory is about to be erased. In the batch file
  1650. ERASE1.BAT, you will get no more questions.
  1651.  
  1652. ERASE1.BAT
  1653. ==========
  1654.  
  1655. @ECHO OFF
  1656. CLS
  1657. ECHO Y | DEL *.*
  1658.  
  1659. By redirecting the Y through a pipe to the command DEL
  1660. we solve the problem. You can also use another method.
  1661.  
  1662. ERASE2.BAT
  1663. ==========
  1664.  
  1665. @ECHO OFF
  1666. ECHO Y > ANSWER
  1667. DEL *.* < ANSWER
  1668.  
  1669. The batch program creates a file called ANSWER. The files
  1670. contain Y and ENTER that DEL *.* needs. The Y is redirected to
  1671. the command DEL and everything is all right. The smart thing is
  1672. that the file ANSWER will be deleted as well, and everything
  1673. is still all right because DEL has already read it. If you want
  1674. to see how it runs, use REM to let MS DOS leave out ECHO OFF.
  1675.  
  1676. Imagine there was a program that would repeat the command
  1677. you just have executed. Imagine how it moves from one directory
  1678. to directory. Lovely, isn't it? And the best thing is: you
  1679. can have it. You can make it yourself by using Scan codes.
  1680.  
  1681. REPEAT.SCR
  1682. ==========
  1683.  
  1684. This little program is created to repeat another command in
  1685. the subdirectories. It starts from the directory where you
  1686. first typed the command and continues to the very end.
  1687. This is how the syntax looks like:
  1688.  
  1689. C:\> REPEAT ERASE2
  1690.  
  1691. As you probably have understood at this moment the command will
  1692. delete all files in the subdirectories below. It's a devil!
  1693. You may use it with many different MS DOS commands, DIR, TYPE,
  1694. etc. If you run it carelessly it is a very dangerous command.
  1695. Not so that it will hurt you or do you any harm, but it could
  1696. course a great deal of unnecessary work.
  1697. My advice is that you better think twice.
  1698. Plan how you will use it.
  1699.  
  1700. Here is the script file, REPEAT.SCR:
  1701.  
  1702. N REPEAT.COM
  1703. E 0100 E9 AD 00 0D 0A 52 45 50 45 41 54 20 2D 3E 20 20
  1704. E 0110 20 20 20 00 3A 5C 00 00 00 00 00 00 00 00 00 00
  1705. E 0120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  1706. E 0130 00 00 00 00 00 00 00 00 00 1A 4E 65 65 64 73 20
  1707. E 0140 44 4F 53 20 32 2E 30 20 2B 24 41 6C 6C 6F 63 61
  1708. E 0150 74 69 6F 6E 20 50 72 6F 62 6C 65 6D 24 53 57 45
  1709. E 0160 45 50 3A 20 43 4F 4D 4D 41 4E 44 20 50 72 6F 62
  1710. E 0170 6C 65 6D 24 53 57 45 45 50 3A 20 41 62 6E 6F 72
  1711. E 0180 6D 61 6C 20 45 78 69 74 24 00 00 00 43 4F 4D 53
  1712. E 0190 50 45 43 3D 00 00 00 00 00 00 7D 00 00 00 5C 00
  1713. E 01A0 00 00 6C 00 00 00 2A 2E 2A 00 2E 2E 00 8F 04 00         
  1714. E 01B0 B4 30 CD 21 3C 02 73 09 BA 3A 01 B4 09 CD 21 CD
  1715. E 01C0 20 86 C4 A3 89 01 BC 8F 04 BB FE 09 B1 04 D3 EB
  1716. E 01D0 B4 4A CD 21 73 05 BA 4A 01 EB E0 06 BB 2C 00 8E
  1717. E 01E0 07 2B FF BE 8C 01 FC 26 80 3D 00 74 14 56 57 B9
  1718. E 01F0 08 00 F3 A6 5F 5E 74 0F 2A C0 B9 FF FF F2 AE EB
  1719. E 0200 E6 07 BA 5D 01 EB B4 83 C7 08 89 3E 94 01 8C 06
  1720. E 0210 96 01 8C 06 98 01 8C 0E 9C 01 8C 0E A0 01 8C 0E
  1721. E 0220 A4 01 07 A0 80 00 04 03 A2 7D 00 C6 06 7E 00 20
  1722. E 0230 C7 06 7F 00 2F 43 B8 00 33 CD 21 88 16 8B 01 2A 
  1723. E 0240 2D B8 01 33 CD 21 BA 3C 03 B8 23 25 CD 21 B4 19
  1724. E 0250 CD 21 04 41 A2 13 01 BE 4F 03 2A D2 B4 47 CD 21
  1725. E 0260 BE 16 01 2A D2 B4 47 CD 21 BE 03 01 FC AC 0A C0
  1726. E 0270 74 08 8A D0 B4 02 CD 21 EB F3 B9 F4 01 B4 0B CD 
  1727. E 0280 21 E2 FA 81 3E 89 01 0A 03 72 0C B2 0D B4 02 CD
  1728. E 0290 21 B2 0A B4 02 CD 21 BB 98 01 C5 16 94 01 2A C0
  1729. E 02A0 B4 4B CD 21 8C C8 8E D8 8E C0 8E D0 BC 8F 04 9C
  1730. E 02B0 2A D2 B8 01 33 CD 21 8A 16 13 01 80 EA 41 B4 0E
  1731. E 02C0 CD 21 9D BA 5D 01 72 0C BA 15 01 B4 3B CD 21 73
  1732. E 02D0 0A BA 74 01 B4 09 CD 21 EB 62 90 8B 16 AD 01 B4
  1733. E 02E0 1A CD 21 80 3E AF 01 00 75 0C BA A6 01 B9 10 00
  1734. E 02F0 B4 4E CD 21 EB 04 B4 4F CD 21 72 25 8B 1E AD 01
  1735. E 0300 F6 47 15 10 74 F0 83 C3 1E 80 3F 2E 74 E8 8B D3
  1736. E 0310 B4 3B CD 21 83 06 AD 01 2B C6 06 AF 01 00 E9 3F
  1737. E 0320 FF 81 3E AD 01 8F 04 74 13 83 2E AD 01 2B C6 06
  1738. E 0330 AF 01 FF BA AA 01 B4 3B CD 21 EB 9F BA 4E 03 B4
  1739. E 0340 3B CD 21 8A 16 8B 01 B8 01 33 CD 21 CD 20
  1740. R CX
  1741. 24F
  1742. W
  1743. Q
  1744.  
  1745. Type the whole script in your editor. My
  1746. favourite is SEMAFOR'S QEDIT, PLAIN ASCII-text.
  1747. Then execute the following command to get REPEAT.COM.
  1748.  
  1749. DEBUG < REPEAT.SCR
  1750.  
  1751. Put the new command where you keep your utilities. You
  1752. are now probably the happy owner of a new and very useful
  1753. tool. But don't blame me if you erase important files.
  1754.  
  1755. Chapter 9: Batch files can be used with memory and RAM
  1756. ======================================================
  1757.  
  1758. It's always exciting when you find new unconventional ways
  1759. of using batch files. I usually test these programs immediately
  1760. to see how I can use them in my work. Below I will show you some
  1761. interesting samples.
  1762.  
  1763. Sometimes you need to find out wether a program is loaded
  1764. into memory or not? Here is a way to do it, it's not
  1765. so very elegant, but it works.
  1766.  
  1767. ISRES.BAT (Is resident)
  1768. =======================
  1769.  
  1770. @ECHO OFF
  1771. REM ISRES.BAT - Tests if a program is loaded into memory
  1772. REM by using
  1773. MEM/C
  1774. SET ISRES=N
  1775. MEM  /c > %temp%memtxt
  1776. FIND "%1" /i < %temp%memtxt > %temp%$$there
  1777. COPY %temp%$$there %temp%isthere > nul
  1778. IF EXIST %temp%isthere SET ISRES=Y
  1779.  
  1780. IF %isres%!==Y! ECHO "%1" the driver is resident.
  1781. IF %isres%!==N! ECHO "%1" The driver is NOT resident.
  1782.  
  1783. DEL %temp%??there > nul
  1784. DEL %temp%memtxt > nul
  1785.  
  1786. Now, what happens in the file?
  1787.  
  1788. As usually we start the program by turning ECHO OFF, we
  1789. don't want the command lines displayed. The second line
  1790. contains comments that explain what the program does. In
  1791. the third line a variable is sent to the environment which
  1792. put ISRES=N. When MS DOS discovers a named parameter in a
  1793. a batch program, the system looks immediately in the
  1794. environment for an entrance assigned a value:
  1795.  
  1796. SET ISRES=N
  1797.  
  1798. In the fourth line MS DOS executes the command MEM with the
  1799. switch /c. The /c is short for /classify. It lists the programs
  1800. that are currently loaded into memory and shows how much
  1801. conventional and upper memory each program is using. MEM
  1802. /classify also summarizes overall memory use and lists the
  1803. largest free memory blocks. You can use the /classify switch
  1804. with /page but not with other MEM switches. You can abbreviate
  1805. /classify as /c. The report is redirected to a directory called
  1806. temp and a file called MEMTXT is created.
  1807.  
  1808. In the fifth line FIND takes over the command. The switch /i
  1809. make the command case-sensitive. The string I'm looking for in
  1810. my case is "HIMEM". The file FIND shall search is MEMTXT,
  1811. the redirecting sign  < tells FIND where to search. The result
  1812. is redirected to C:\WINDOWS\TEMP$$THERE. $$THERE is not so easy
  1813. to understand, but I copy  $$THERE to ISTHERE. I don't want
  1814. any messages that says that 1 file (s) copied and is therefore
  1815. redirected to nothing, > NUL. In the next line the command IF EXIST
  1816. tests if ISTHERE exists and if it does the result is that the
  1817. SET VARIABLE in environment is set Y with SET ISRES=Y.
  1818. I line eight and nine we get the message:
  1819. If the variable is set to Y, ECHO shows : "HIMEM"
  1820. driver is resident.
  1821. If the variable is set to N, ECHO displays  "HIMEM" driver
  1822. is NOT resident. When the job is done the batch program
  1823. deletes the files ??THERE and MEMTXT.
  1824.  
  1825. The syntax is simple:
  1826. Type ISRES prog_name.
  1827.  
  1828. If "prog_name" exists the report from MEM /c the ISRES
  1829. variable will be set to Y, or will continue to N. Notice
  1830. that MS DOS doesn't copy 0-byte files. If the search string
  1831. does not exist in the report from MEM /c, the file
  1832. $$THERE won't be copied to ISTHERE, and the line IF...EXIST
  1833. will fail.
  1834.  
  1835. RAMDRIVE.BAT
  1836. ============
  1837.  
  1838. Very simple you can define a RAM-disk as a diskette where
  1839. the files isn't stored physically on a magnetic disk,
  1840. but temporary in the computer's memory. From a user's point
  1841. of view a RAM-disk behaves just like other diskettes, but since
  1842. the computer doesn't need to read disks a RAM-drive is very fast.
  1843. But very few make use of the possibility. The reason is that the
  1844. RAM-drive use memory wether you need it or not, and you lose the
  1845. content when you turn off the computer. A much better alternative
  1846. is a so called CACHE-buffer, which acts as an "intelligent"
  1847. RAM-disk.
  1848.  
  1849. RAM-drives are created in the CONFIG.SYS file by typing the
  1850. command DEVICE=RAMDRIVE.SYS. In addition you have to specify
  1851. the disksize, the sectorsize and the number of files and directories
  1852. you can create in the RAM disk's root directory. RAMDRIVE or VDISK is
  1853. allocated automatically in the first empty logical location.
  1854. If your computer is equipped with to diskette drives (A and B) the
  1855. RAM-drive will be C. If your computer has got a hard disk the RAM drive
  1856. will be D.
  1857.  
  1858. RAMDRIVE.SYS has four parameters:
  1859.  
  1860. DEVICE=RAMDRIVE.SYS <disksize><sectorsize><numentris>
  1861. and two switches /e and /a,
  1862.  
  1863. /e Creates the RAM disk in extended memory instead of in
  1864. expanded memory or conventional memory.
  1865.  
  1866. /a Creates the RAM disk in expanded memory instead of in
  1867. extended or conventional memory.
  1868.  
  1869. Syntax
  1870.  
  1871.     DEVICE=[drive:][path]RAMDRIVE.SYS [DiskSize SectorSize [NumEntries]]]
  1872.     [/E | /A]
  1873.  
  1874. Parameters
  1875.  
  1876. [drive:][path]
  1877.     Specifies the location of the RAMDRIVE.SYS file.
  1878.  
  1879. DiskSize
  1880.     Specifies how many kilobytes of memory you want to use for the RAM
  1881.     drive. For example, to create a 640K RAM drive, specify 640. If you
  1882.     don't specify an amount, RAMDrive will create a 64K RAM drive. You can
  1883.     specify a value from 4 to 32767. However, you cannot specify more memory
  1884.     than your system has available.
  1885.  
  1886. SectorSize
  1887.     Specifies the disk sector size in bytes. The size can be 128, 256, or
  1888.     512 bytes. (If you include a SectorSize value, you must also include a
  1889.     value for DiskSize.)
  1890.  
  1891.     Generally, you should use the default sector size of 512 bytes.
  1892.  
  1893. NumEntries
  1894.     Limits the number of files and directories you can create in the RAM
  1895.     drive's root directory. The limit can be from 2 to 1024 entries; the
  1896.     limit you specify is rounded up to the nearest sector size boundary. If
  1897.     you do not specify a limit, you can create up to 64 entries in the RAM
  1898.     drive's root directory. (If you include a value for NumEntries, you must
  1899.     also include values for DiskSize and SectorSize.)
  1900.  
  1901.     If there is not enough memory to create the RAM drive as specified,
  1902.     RAMDrive will try to create it with a limit of 16 directory entries.
  1903.     This may result in a RAM drive with a different limit from the one you
  1904.     specified. 
  1905.  
  1906.     For RAMDrive to use extended memory, your system must be configured so
  1907.     that it provides extended memory, and a DEVICE command for the
  1908.     extended-memory manager (such as HIMEM.SYS) must appear in your
  1909.     CONFIG.SYS file before the DEVICE command for RAMDRIVE.SYS. In general,
  1910.     it is best to create a RAM drive in extended memory if your system has
  1911.     extended memory.
  1912.  
  1913.  
  1914.     For RAMDrive to use expanded memory, your system must be configured so
  1915.     that it provides expanded memory, and the DEVICE command for the
  1916.     expanded-memory manager (such as EMM386, 386MAX, CEMM, or QEMM) must
  1917.     appear in your CONFIG.SYS file before DEVICE command for RAMDRIVE.SYS.
  1918.  
  1919.  
  1920. DEVICE=C:\DOS\RAMDRIVE.SYS 128 256 16
  1921.  
  1922. or create a RAM-disk with 1.5 Megabyte, 512-byte
  1923. sectors and 200 file names in extended memory:
  1924.  
  1925. DEVICE=C:\DOS\RAMDRIVE.SYS 1500 512 200 /E
  1926.  
  1927. The use of RAM-disk can be divided in two groups. To optimize
  1928. a certain process or you need to increase the speed generally.
  1929. A typical example of optimizing a certain process is for example
  1930. a program that reads two files at the same time and you get
  1931. a disk trashing. This leads to that the reading head jumps
  1932. between the to files as they are read into the computer. In
  1933. addition you sit and wait for the computer to finish. If you
  1934. place at least one of the files on a RAM-disk you avoid the
  1935. problem. If you use the technique on similar problems you can
  1936. achieve a much better efficiency and you can automate it. Think
  1937. of a routine that automatically copy a file to a RAM drive, runs
  1938. the job and maybe copies the file back and removes it from
  1939. the RAM drive.
  1940.  
  1941. You can also speed up DOS by using external commands or useful
  1942. tools with a RAM drive. For example in AUTOEXEC.BAT which the
  1943. computer runs each time you turn it on. The RAM-disk should be
  1944. written in the beginning of the PATH-variable.
  1945.  
  1946. To make it easier to use a RAM-disk you can run the batch file
  1947. below, RAMDRIVE.BAT. The file will create and remove a RAM-disk
  1948. to your needs. You don't have to make changes in the CONFIG.SYS
  1949. directly. The RAMDRIVE.BAT uses to commands called
  1950. REPLY and RESET. REPLY stops and waits for you to press a key
  1951. and returns an ASCII-code.
  1952. If you press any of the special keys on the keyboard it returns
  1953. the enhanced ASCII-code (Extended ASCII). RESET reboots the
  1954. computer as (Ctrl-Alt-Del) so the new changes can take place.
  1955. The can make the programs by using scan codes and compile them
  1956. in DEBUG. Here is how to do it: Create a file called .SCR-file
  1957. and redirect it to DEBUG:
  1958.  
  1959. DEBUG<filename.scr
  1960.  
  1961. Type the following in your favourite editor, mine is Qedit:
  1962.  
  1963. REPLY.SCR
  1964. =========
  1965.  
  1966. n reply.com 
  1967. a 100 
  1968. mov ah,8 
  1969. int 21 
  1970. cmp al,0 
  1971. jnz 10a 
  1972. int 21 
  1973. mov ah,4c 
  1974. int 21 
  1975.  
  1976. r cx 
  1977.  
  1978.  
  1979. RESET.SCR
  1980. =========
  1981.  
  1982. n reset.com 
  1983. a 100 
  1984. mov ax,40 
  1985. mov ds,ax 
  1986. mov ax,1234 
  1987. mov [0072], ax 
  1988. jmp f000:e05b 
  1989.  
  1990. r cx 
  1991. 10 
  1992. q
  1993.  
  1994. You write RAMDRIVE.BAT as a normal batch file. But be accurate. The
  1995. file is rather complicated.
  1996.  
  1997. RAMDRIVE.BAT
  1998. ============
  1999.  
  2000. @ECHO OFF
  2001. CLS
  2002. C:
  2003. CD\
  2004. IF "%1"=="none" GOTO NOTHING
  2005. IF "%1"=="new" GOTO RAMDRIVE
  2006. IF "%1"=="add" GOTO RAMDRIVE
  2007. ECHO Syntax:
  2008. ECHO RAMDRIVE add {size} {sector} {files} [/E]
  2009. ECHO RAMDRIVE new {size} {sector} {files} [/E]
  2010. ECHO RAMDRIVE none
  2011. GOTO STATUS
  2012. :NOTHING
  2013. COPY CONFIG.$$$ CONFIG.NEW >nul
  2014. IF EXIST ramdrive.log DEL ramdrive.log
  2015. IF EXIST log.new DEL log.new
  2016. IF EXIST config.new DEL config.new
  2017. GOTO RESET
  2018. :RAMDRIVE
  2019. IF not "%2"=="" IF not "%3"=="" IF not "%4"=="" GOTO OK
  2020. ECHO You must specify at least three parameters to the ramdrive
  2021. GOTO END
  2022. :OK
  2023. IF %1==none COPY config.$$$ config.new >nul
  2024. IF %1==new COPY config.sys config.new
  2025. IF %1==add IF EXIST RAMDRIVE.log COPY RAMDRIVE.log log.new >nul
  2026. ECHO DEVICE=C:\DOS\RAMDRIVE.sys %2 %3 %4 %5 >>config.ref
  2027. COPY config.ref+config.$$$ config.new >nul
  2028. IF "%5"=="" ECHO %2 Kbyte disk with %3-byte sectors and max %4 files>>log.new
  2029. IF "%5"=="/E" ECHO %2 Kbyte disk with %3-byte sectors and max %4 files in extended memory>>log.new
  2030. :RESET
  2031. ECHO The following RAMDRIVES are now defined:
  2032. IF EXIST log.new type log.new
  2033. IF NOT EXIST log.new ECHO ***  NOTHING  ***
  2034. ECHO Press F1 to continue or any other key to cancel.
  2035. REPLY
  2036. IF ERRORLEVEL 59 IF NOT ERRORLEVEL 60 GOTO DO_IT
  2037. ECHO ***  CANCELLED ***
  2038. IF EXIST log.new DEL log.new
  2039. GOTO STATUS
  2040. :DO_IT
  2041. DEL config.sys
  2042. REN config.new config.sys
  2043. IF EXIST log.new COPY log.new Ramdrive.log >nul
  2044. RESET
  2045. :STATUS
  2046. ECHO Active RAMDRIVE:
  2047. IF EXIST RAMDRIVE.log type RAMDRIVE.log
  2048. IF NOT EXIST RAMDRIVE.log ECHO ***  NOTHING  ***
  2049. :END
  2050.  
  2051. Before you run RAMDRIVE.BAT you must copy the original
  2052. CONFIG.SYS to CONFIG.$$$.
  2053. Then you type RAMDRIVE. Both REPLY and RESET must be in
  2054. the path. RAMDRIVE.BAT must be located in the root
  2055. directory.
  2056.  
  2057. Chapter 10: To remove files accidentally extracted
  2058. ================================================
  2059.  
  2060. DEZIP.BAT
  2061. =========
  2062. @ECHO OFF
  2063. :DEZIP.BAT - Removes file accidentally extracted to the wrong directory.
  2064. :            (Type "DEZIP /?" (not the quotes) for brief instructions).
  2065.  ECHO.
  2066. :Check user parameters------------------------------------------------
  2067.  if (%1)==() goto SYNTAX
  2068.  if (%1)==(?) goto SYNTAX
  2069.  if (%1)==(/?) goto SYNTAX
  2070.  if (%2)==() goto SYNTAX
  2071.  if (%2)==(?) goto SYNTAX
  2072.  if (%2)==(/?) goto SYNTAX
  2073. :Check target directory ------------------------------------------------
  2074.  if not exist %1\nul echo   Error: %1 does NOT exist!
  2075.  if not exist %1\nul goto SYNTAX
  2076.  if not exist %1\*.* echo   Error: %1 does NOT contain any files!
  2077.  if not exist %1\*.* goto SYNTAX
  2078. :Check for ZIP file ----------------------------------------------------
  2079.  if not exist %2 echo   Error: %2 does NOT exist!
  2080.  if not exist %2 goto SYNTAX
  2081. :Check for PKZIP.EXE ---------------------------------------------------
  2082.  ctty nul
  2083.  ver|pkzip>temptemp
  2084.  ctty con
  2085.  copy temptemp+,,>nul
  2086.  if not exist temptemp echo   Error: PKZIP is NOT available!
  2087.  if not exist temptemp goto SYNTAX
  2088. :Do it! ----------------------------------------------------------------
  2089.  pkzip- -fm %2 %1\*.*>nul
  2090.  if errorlevel 18 echo   Error: PKZIP reports it is unable to open 1 or
  2091.  if errorlevel 18 echo          more specified files.
  2092.  if errorlevel 18 goto SYNTAX
  2093.  if errorlevel 17 echo   Error: PKZIP reports there are too many files
  2094.  if errorlevel 17 echo          for the amount of memory available.
  2095.  if errorlevel 17 goto SYNTAX
  2096.  if errorlevel 16 echo   Error: PKZIP reports bad or illegal parameters
  2097.  if errorlevel 16 echo          specified.
  2098.  if errorlevel 16 goto SYNTAX
  2099.  if errorlevel 15 echo   Error: PKZIP reports the ZIP file is read-only
  2100.  if errorlevel 15 echo          and can not be modified.
  2101.  if errorlevel 15 goto SYNTAX
  2102.  if errorlevel 14 echo   Error: PKZIP reports your disk is full.
  2103.  if errorlevel 14 goto SYNTAX
  2104.  if errorlevel 13 echo   Error: PKZIP reports the specified ZIP: %2
  2105.  if errorlevel 13 echo          was NOT found.
  2106.  if errorlevel 13 goto SYNTAX
  2107.  if errorlevel 12 echo   Error: PKZIP reports NO files were found to
  2108.  if errorlevel 12 echo          add/delete to/from ZIP file.
  2109.  if errorlevel 12 goto SYNTAX
  2110.  if errorlevel 11 echo   Error: PKZIP reports Insufficient memory.
  2111.  if errorlevel 11 goto SYNTAX
  2112.  if errorlevel  3 echo   Error: PKZIP reports error in ZIP file.
  2113.  if errorlevel  3 goto SYNTAX
  2114.  if errorlevel  1 echo   Error: PKZIP reports bad file name or file
  2115.  if errorlevel  1 echo          specification.
  2116. :SUCCESS ---------------------------------------------------------------
  2117.  echo Any files that were in subdirectory: %1
  2118.  echo with the same filenames as files in: %2
  2119.  echo have been successfully removed from: %1
  2120.  echo.
  2121.  echo.
  2122.  goto CLEANUP
  2123. :SYNTAX ----------------------------------------------------------------
  2124.  echo.
  2125.  echo    Name: DEZIP.BAT v1.1 - Vernon Frazee 06/91
  2126.  echo.
  2127.  echo Purpose: Removes files accidentally unZIPped to the wrong directory.
  2128.  echo.
  2129.  echo  Syntax: [d:][\path\]DEZIP  d:\path  d:\path\filename.zip
  2130.  echo.
  2131.  echo   Where: "d:\path" is the drive:\directory containing the files
  2132.  echo           you want DEZIP to remove.
  2133.  echo.
  2134.  echo          "d:\path\filename.zip" is the ZIP file containing the
  2135.  echo          filenames you want removed from "d:\path".
  2136.  echo.
  2137.  echo                           \/--------------[ Any files in this ZIP
  2138.  echo Example: DEZIP  C:\LOTUS  D:\NEW\FOO.ZIP
  2139.  echo                 /\------------------------[ remove from this DIR.
  2140.  echo.
  2141.  echo English: Remove all the files from the C:\LOTUS directory that are
  2142.  echo          duplicates of any files found in D:\NEW\FOO.ZIP.
  2143.  echo.
  2144.  echo    Note: PKZIP.EXE must be available somewhere in your PATH.
  2145.  echo.
  2146. :CLEANUP ---------------------------------------------------------------
  2147.  if exist temptemp del temptemp
  2148. :END ------------------------------------------------------------- -vjf-
  2149.  
  2150.  
  2151. Chapter 11: Choice
  2152. ==================
  2153.  
  2154. While experimenting with DOSSHELL I pressed the Enter
  2155. key with a Batch File highlighted.  Of course the file was executed even
  2156. though I didn't really want to defrag my drive at the moment.  Associating
  2157. this batch file with the .BAT extension provides the option to Edit, Run
  2158. or Cancel.  Seems like this could also be cloned to send .DOC files to the
  2159. Word Processor, ASCII Editor, or Viewer; view or extract archives; etc..
  2160.  
  2161. MULTIJOB.BAT
  2162. ============
  2163.  
  2164.   @ECHO off
  2165.   rem CLS bright white on blue (ansi)
  2166.   ECHO 
  2167. ECHO ===============================[Multi-Associate]===========================
  2168. ECHO Please select action to take with: %1
  2169. ECHO.
  2170.   CHOICE /c:erc Edit, Run, or Cancel
  2171.   IF errorlevel 3 GOTO clear
  2172.   IF errorlevel 2 GOTO run
  2173.   IF errorlevel 1 GOTO editor
  2174. :editor
  2175.   ECHO 
  2176.   edit %1
  2177.   GOTO end
  2178. :run
  2179.   ECHO 
  2180.   CALL %1
  2181.   GOTO end
  2182. :clear
  2183.   ECHO 
  2184. :end
  2185. rem -- multiple-association batch file for DOSSHELL --
  2186.  
  2187. Chapter 12:  How to get the system date
  2188. =======================================
  2189.  
  2190. In this chapter we will discuss among other topics how
  2191. to get the system date, using only three letters and without
  2192. a complicated batch file with labels and GOTO.
  2193. We start with a simple COM program called MON.COM. created
  2194. with scan codes.
  2195.  
  2196. Write the following into your editor. My favourite is
  2197. Qedit.
  2198.  
  2199. MON.SCR
  2200. =======
  2201.  
  2202. N MON.COM
  2203. A 100
  2204. MOV AH, 2A
  2205. INT 21
  2206. MOV AL, DH
  2207. MOV AH, 4C
  2208. INT 21
  2209.  
  2210. R CX
  2211. A
  2212. W
  2213. Q
  2214.  
  2215.  
  2216. ;int 21h/2a Get System Date
  2217. ;returns:
  2218. ; al day of week (0-6)
  2219. ; cx year (1980-2099)
  2220. ; dh month (1-12)
  2221. ; dl day (1-31)
  2222.         mov ah,2ah
  2223.         int 21h
  2224.         mov al,dh          ; we send the month in errorlevel
  2225.         mov ah,4ch
  2226.         int 21h
  2227.  
  2228. Then the batch file.
  2229.  
  2230. MON.BAT
  2231. =======
  2232. @echo off
  2233. mon
  2234. if errorlevel 1 set mon=jan
  2235. if errorlevel 2 set mon=feb
  2236. if errorlevel 3 set mon=mar
  2237. if errorlevel 4 set mon=apr
  2238. if errorlevel 5 set mon=may
  2239. if errorlevel 6 set mon=jun
  2240. if errorlevel 7 set mon=jul
  2241. if errorlevel 8 set mon=aug
  2242. if errorlevel 9 set mon=sep
  2243. if errorlevel 10 set mon=oct
  2244. if errorlevel 11 set mon=nov
  2245. if errorlevel 12 set mon=dec
  2246.  
  2247.  
  2248. Technically what we have here is an exception to the high -> low testing of
  2249. errorlevel. In our example it works because we are constantly
  2250. overwriting a single variable from the lowest errorlevel to the one that
  2251. you want. Although it works, I believe it is poor programming practice
  2252. because:
  2253.         1) it is an exceptional case and programming techniques should
  2254.         be as consistent as possible both for the benefit of the
  2255.         programmer, who does not have to consider "is this an exception
  2256.         and therefore I can do another way if I want to", and more
  2257.         importantly for anybody else who may need to read, and or
  2258.         maintain, the code.
  2259.         2) it is less efficient since you are consuming extra memory
  2260.         cycles for each errorlevel below the one you want by rewriting
  2261.         the variable each time.
  2262.  
  2263. I guess I have been in this business too long, but I continue to
  2264. look with amazement at the bloat that has taken place in both program
  2265. size and machine cycle capability to perform them. There have been
  2266. several batch files that will set a date or
  2267. time in an environment variable. They are smaller and do
  2268. not require any additional unique programs or capabilities other than
  2269. what can be done with plain DOS.
  2270.  
  2271. Despite all of the above, I think the program is a clever use of
  2272. both assembly language and a batch file.
  2273.  
  2274.  
  2275. Here is another batch file which gets the system date.
  2276.  
  2277. GETDATE.BAT
  2278. ===========
  2279.  
  2280. : Sets the date as an environment variable.
  2281.  
  2282. ECHO @ECHO OFF > C:\CURRENT.BAT
  2283. ECHO @SET TODAY=%%4 >> C:\CURRENT.BAT
  2284. ECHO. | DATE | FIND "Current" > C:\GDATE.BAT
  2285. CALL C:\GDATE.BAT < C:\CURRENT.BAT
  2286. DEL C:\CURRENT.BAT > NUL
  2287. DEL C:\GDATE.BAT > NUL
  2288.  
  2289. This puts the current date as mo-da-year in the environment variable
  2290. TODAY.
  2291.  
  2292. ECHO @ECHO OFF > C:\CURRENT.BAT
  2293. ECHO @SET TODAY=%%4 >> C:\CURRENT.BAT
  2294. ECHO. | DATE | FIND "Current" > C:\GDATE.BAT
  2295. CALL C:\GDATE.BAT < C:\CURRENT.BAT
  2296. DEL C:\CURRENT.BAT > NUL
  2297. DEL C:\GDATE.BAT > NUL
  2298.  
  2299. the mo-da-year will be in TODAY.
  2300.  
  2301. echo.|date>!!temp.bat
  2302. echo set today=%%4>current.bat
  2303. call temp.bat
  2304. del temp.bat
  2305. del current.bat
  2306. rem>%TODAY%.T$T
  2307.  
  2308. NOTE! Following lines beginning with "for" should be all on one line.
  2309. Also note that the line beginning with "for %%y" handles years 1993
  2310. through 1999 only. You will need to change this on January 1, 2000.
  2311.  
  2312. for %%m in (01 02 03 04 05 06 07 08 09 10 11 12) do if exist %%m-??-19.T$T set M=%%M
  2313. for %%d in (01 02 03 04 05 06 07 08 09 10) do if exist %M%-%%d-19.T$T
  2314. set D=%%d
  2315. for %%d in (11 12 13 14 15 16 17 18 19 20) do if exist %M%-%%d-19.T$T
  2316. set D=%%d
  2317. for %%d in (21 22 23 24 25 26 27 28 29 30 31) do if exist %M%-%%d-19.T$T
  2318. set D=%%d
  2319. for %%y in (3 4 5 6 7 8 9) do if "%TODAY%" == "%M%-%D%-199%%y" set Y=%%y
  2320. del %TODAY%.T$T
  2321. SET TODAY=
  2322. SET M=
  2323. SET D=
  2324. SET Y=
  2325.  
  2326.  
  2327.  
  2328. @ECHO off
  2329. ::set month to alpha as an environment variable using plain dos
  2330. ECHO.|date>gdate.bat
  2331. ECHO set today=%%4 > current.bat
  2332. CALL gdate.bat
  2333. DEL gdate.bat
  2334. DEL current.bat
  2335. REM>%TODAY%
  2336. FOR %%m IN (01 02 03 04 05 06 07 08 09 10 11 12) DO IF EXIST
  2337. %%m-??-?? SET MN=%m
  2338. IF "%MN%" == "01" set MON=Jan
  2339. IF "%MN%" == "02" set MON=Feb
  2340. IF "%MN%" == "03" set MON=Mar
  2341. IF "%MN%" == "04" set MON=Apr
  2342. IF "%MN%" == "05" set MON=May
  2343. IF "%MN%" == "06" set MON=Jun
  2344. IF "%MN%" == "07" set MON=Jul
  2345. IF "%MN%" == "08" set MON=Aug
  2346. IF "%MN%" == "09" set MON=Sep
  2347. IF "%MN%" == "10" set MON=Oct
  2348. IF "%MN%" == "11" set MON=Nov
  2349. IF "%MN%" == "12" set MON=Dec
  2350. IF exist %MN%-??-?? DEL %MN%-??-??
  2351. set TODAY=
  2352. set MN=
  2353.  
  2354. @echo off
  2355. rem GETDTVAR.BAT
  2356. rem Put current day, date, time into every LOGDAY, LOGDATE and LOGTIME
  2357. ver | date > %temp%\gd.bat
  2358. echo set logday=%%3 >current.bat
  2359. echo set logdate=%%4 >>current.bat
  2360. call %temp%\gd
  2361. ver | time>%temp%\gd.bat
  2362. echo set logtime=%%3 >current.bat
  2363. call %temp%\gd
  2364. for %%a in (%temp%\gd.bat current.bat) do del %%a>nul
  2365.  
  2366. Get (GET26A.ZIP) is great for just this kind of thing.  A shareware
  2367. utility that does all kinds of things involving the environment.
  2368.  
  2369. I need a way to (1) save the current DATE and (2) set the DATE
  2370. ahead by a fixed number of days.
  2371.  
  2372. Saving is easy, there'll be an ECHO . | DATE > in there
  2373. somewhere.
  2374.  
  2375. The second is trickier. I know that DATE will deliver a text
  2376. string that will call CURRENT.BAT, which thus gets the MM DD and
  2377. YYYY of today's system date.
  2378.  
  2379. I believe too that if I can increment those values (wrap-around
  2380. at end-of-month and end-of-year would be nice!) I can reset the
  2381. date using the new values.
  2382.  
  2383. How to increment string values?
  2384.  
  2385. I've toyed with the idea of building a value by repeated copying
  2386. of a 1-byte file:
  2387.         COPY ERASE1+1BYTE ERASE1
  2388. and then grabbing the size field of the DIR command output.
  2389.  
  2390. I've toyed with the idea of setting a string to be the
  2391. appropriate length (here's a 5-character string that represents
  2392. today's date, here's a 14-character string that represents two
  2393. weeks into the future, calculate them. My suggestion is to write
  2394. a computer program to do it, even in BASIC.
  2395. It would be cleaner, faster, and easier too, and could utilize
  2396. system resources for doing the wrap or even avoiding February
  2397. problems in leap years, or whatever.
  2398.  
  2399. This won't be an answer to the problem as much as it is a theory that
  2400. may apply. You may find it easier to manipulate the dates within the
  2401. Julian Calendar, and when you've done all your calculations and so
  2402. forth, then translate the Julian Calendar back to our normal calendar,
  2403. and voila.
  2404.  
  2405. REM BUMPDAY.BAT
  2406. ::      Increment the DAY by 1. Roll into next month.
  2407. ::      Calls SETMAXDY, BUMPMTH (and hence BUMPYEAR)
  2408. @echo off
  2409. call SETMAXDY
  2410. set MAXMTH=12
  2411. if "1"=="31" goto BUMPMTH
  2412. set RES=1
  2413. call INCBY1
  2414. set DAY=2
  2415. goto EXIT
  2416. :BUMPMTH
  2417. call BUMPMTH
  2418. :EXIT
  2419. @echo 8/2/1
  2420. REM end of BUMPDAY.BAT
  2421. =======================================================================
  2422. REM SETMAXDY.BAT
  2423. ::      Define MAXDAY based on MONTH number
  2424. ::      Called from BUMPDAY.BAT
  2425. @echo off
  2426. if "%month%"=="1" set maxday=31
  2427. if "%month%"=="2" set maxday=28
  2428. if "%month%"=="3" set maxday=31
  2429. if "%month%"=="4" set maxday=30
  2430. if "%month%"=="5" set maxday=31
  2431. if "%month%"=="6" set maxday=30
  2432. if "%month%"=="7" set maxday=31
  2433. if "%month%"=="8" set maxday=31
  2434. if "%month%"=="9" set maxday=30
  2435. if "%month%"=="10" set maxday=31
  2436. if "%month%"=="11" set maxday=30
  2437. if "%month%"=="12" set maxday=31
  2438. REM end of SETMAXDY.BAT
  2439. ==================================================================
  2440. REM BUMPMTH.BAT
  2441. :: Bump the MONTH number up by 1. Roll into the next YEAR.
  2442. ::      Called from BUMPDAY. Calls BUMPYEAR
  2443. set DAY=1
  2444. if "2"=="12" goto BUMPYEAR
  2445. :BUMPMONTH
  2446. set RES=2
  2447. call INCBY1
  2448. set MONTH=2
  2449. goto EXIT
  2450. :BUMPYEAR
  2451. call BUMPYEAR
  2452. :EXIT
  2453. REM End of BUMPMONTH.BAT
  2454. =======================================================================
  2455. REM BUMPYEAR.BAT
  2456. :: Increment the year by 1. Called from BUMPMTH.BAT
  2457. set MONTH=1
  2458. set RES=8
  2459. call INCBY1
  2460. set YEAR=2
  2461. REM end of BUMPYEAR.BAT
  2462. =======================================================================
  2463. REM INCBY1.BAT
  2464. :: Increment the environment variable RES by 1
  2465. ::      called from BUMPDAY. BUMPMTH, BUMPYEAR
  2466. @echo off
  2467. if "%res%"=="30" goto 31
  2468. if "%res%"=="29" goto 30
  2469. if "%res%"=="28" goto 29
  2470. if "%res%"=="27" goto 28
  2471. if "%res%"=="26" goto 27
  2472. if "%res%"=="25" goto 26
  2473. if "%res%"=="24" goto 25
  2474. if "%res%"=="23" goto 24
  2475. if "%res%"=="22" goto 23
  2476. if "%res%"=="21" goto 22
  2477. if "%res%"=="20" goto 21
  2478. if "%res%"=="19" goto 20
  2479. if "%res%"=="18" goto 19
  2480. if "%res%"=="17" goto 18
  2481. if "%res%"=="16" goto 17
  2482. if "%res%"=="15" goto 16
  2483. if "%res%"=="14" goto 15
  2484. if "%res%"=="13" goto 14
  2485. if "%res%"=="12" goto 13
  2486. if "%res%"=="11" goto 12
  2487. if "%res%"=="10" goto 11
  2488. if "%res%"=="9" goto  10
  2489. if "%res%"=="8" goto 9
  2490.  
  2491. set YEAR=8
  2492. set DAY=1
  2493. set MONTH=2
  2494. call BUMPDAY (repeatedly)
  2495. =======================================================================
  2496. REM BUMPDAY.BAT
  2497. ::      Increment the DAY by 1. Roll into next month.
  2498. ::      Calls SETMAXDY, BUMPMTH (and hence BUMPYEAR)
  2499. @echo off
  2500. call SETMAXDY
  2501. set MAXMTH=12
  2502. if "1"=="31" goto BUMPMTH
  2503. set RES=1
  2504. call INCBY1
  2505. set DAY=2
  2506. goto EXIT
  2507. :BUMPMTH
  2508. call BUMPMTH
  2509. :EXIT
  2510. @echo 8/2/1
  2511. REM end of BUMPDAY.BAT
  2512. =======================================================================
  2513. REM SETMAXDY.BAT
  2514. ::      Define MAXDAY based on MONTH number
  2515. ::      Called from BUMPDAY.BAT
  2516. @echo off
  2517. if "%month%"=="1" set maxday=31
  2518. if "%month%"=="2" set maxday=28
  2519. if "%month%"=="3" set maxday=31
  2520. if "%month%"=="4" set maxday=30
  2521. if "%month%"=="5" set maxday=31
  2522. if "%month%"=="6" set maxday=30
  2523. if "%month%"=="7" set maxday=31
  2524. if "%month%"=="8" set maxday=31
  2525. if "%month%"=="9" set maxday=30
  2526. if "%month%"=="10" set maxday=31
  2527. if "%month%"=="11" set maxday=30
  2528. if "%month%"=="12" set maxday=31
  2529. REM end of SETMAXDY.BAT
  2530. ==================================================================
  2531. REM BUMPMTH.BAT
  2532. :: Bump the MONTH number up by 1. Roll into the next YEAR.
  2533. ::      Called from BUMPDAY. Calls BUMPYEAR
  2534. set DAY=1
  2535. if "2"=="12" goto BUMPYEAR
  2536. :BUMPMONTH
  2537. set RES=2
  2538. call INCBY1
  2539. set MONTH=2
  2540. goto EXIT
  2541. :BUMPYEAR
  2542. call BUMPYEAR
  2543. :EXIT
  2544. REM End of BUMPMONTH.BAT
  2545. =======================================================================
  2546. REM BUMPYEAR.BAT
  2547. :: Increment the year by 1. Called from BUMPMTH.BAT
  2548. set MONTH=1
  2549. set RES=8
  2550. call INCBY1
  2551. set YEAR=2
  2552. REM end of BUMPYEAR.BAT
  2553. =======================================================================
  2554. REM INCBY1.BAT
  2555. :: Increment the environment variable RES by 1
  2556. ::      called from BUMPDAY. BUMPMTH, BUMPYEAR
  2557. @echo off
  2558. if "%res%"=="30" goto 31
  2559. if "%res%"=="29" goto 30
  2560. if "%res%"=="28" goto 29
  2561. if "%res%"=="27" goto 28
  2562. if "%res%"=="26" goto 27
  2563. if "%res%"=="25" goto 26
  2564. if "%res%"=="24" goto 25
  2565. if "%res%"=="23" goto 24
  2566. if "%res%"=="22" goto 23
  2567. if "%res%"=="21" goto 22
  2568. if "%res%"=="20" goto 21
  2569. if "%res%"=="19" goto 20
  2570. if "%res%"=="18" goto 19
  2571. if "%res%"=="17" goto 18
  2572. if "%res%"=="16" goto 17
  2573. if "%res%"=="15" goto 16
  2574. if "%res%"=="14" goto 15
  2575. if "%res%"=="13" goto 14
  2576. if "%res%"=="12" goto 13
  2577. if "%res%"=="11" goto 12
  2578. if "%res%"=="10" goto 11
  2579. if "%res%"=="9" goto  10
  2580. if "%res%"=="8" goto 9
  2581. if "%res%"=="7" goto 8
  2582. if "%res%"=="6" goto 7
  2583. if "%res%"=="5" goto 6
  2584. if "%res%"=="4" goto 5
  2585. if "%res%"=="3" goto 4
  2586. if "%res%"=="2" goto 3
  2587. if "%res%"=="1" goto 2
  2588. if "%res%"=="0" goto 1
  2589. pause
  2590. goto exit
  2591. :31
  2592. set res=31
  2593. goto exit
  2594. :30
  2595. set res=30
  2596. goto exit
  2597. :29
  2598. set res=29
  2599. goto exit
  2600. :28
  2601. set res=28
  2602. goto exit
  2603. :27
  2604. set res=27
  2605. goto exit
  2606. :26
  2607. set res=26
  2608. goto exit
  2609. :25
  2610. set res=25
  2611. goto exit
  2612. :24
  2613. set res=24
  2614. goto exit
  2615. :23
  2616. set res=23
  2617. goto exit
  2618. :22
  2619. set res=22
  2620. goto exit
  2621. :21
  2622. set res=21
  2623. goto exit
  2624. :20
  2625. set res=20
  2626. goto exit
  2627. :19
  2628. set res=19
  2629. goto exit
  2630. :18
  2631. set res=18
  2632. goto exit
  2633. :17
  2634. set res=17
  2635. goto exit
  2636. :16
  2637. set res=16
  2638. goto exit
  2639. :15
  2640. set res=15
  2641. goto exit
  2642. :14
  2643. set res=14
  2644. goto exit
  2645. :13
  2646. set res=13
  2647. goto exit
  2648. :12
  2649. set res=12
  2650. goto exit
  2651. :11
  2652. set res=11
  2653. goto exit
  2654. :10
  2655. set res=10
  2656. goto exit
  2657. :9
  2658. set res=9
  2659. goto exit
  2660. :8
  2661. set res=8
  2662. goto exit
  2663. :7
  2664. set res=7
  2665. goto exit
  2666. :6
  2667. set res=6
  2668. goto exit
  2669. :5
  2670. set res=5
  2671. goto exit
  2672. :4
  2673. set res=4
  2674. goto exit
  2675. :3
  2676. set res=3
  2677. goto exit
  2678. :2
  2679. set res=2
  2680. goto exit
  2681. :1
  2682. set res=1
  2683. goto exit
  2684. :0
  2685. set res=0
  2686. goto exit
  2687. :1
  2688. set res=1
  2689. goto exit
  2690. :exit
  2691. REM end of IncBy1.BAT
  2692. ==================================================================
  2693.         Run this through  DEBUG, like so: DEBUG < SPFOWARD.SCR.
  2694.  
  2695. n spfoward.com
  2696. a 100
  2697. mov ah,2c
  2698. int 21
  2699. inc ch
  2700. mov ah,2d
  2701. int 21
  2702. ret
  2703. (blank line)
  2704. rcx
  2705. b
  2706. w
  2707. q
  2708.  
  2709. Then, anytime *before* 11PM on any day (because it doesn't
  2710. check to see if the hours are > 11PM and won't adjust the day right if
  2711. so), just do SPFOWARD from DOS. When fall comes, make a copy of
  2712. SPFOWARD.SCR  called FALLBACK.SCR, change the N at the top to read N
  2713. fallback.com, change the "inc ch" to "dec ch", and run the fallback.scr
  2714. through DEBUG, run FALLBACK from DOS *after* 1am on any day and you'll be
  2715. back to non-DST time. Hope this helps.
  2716.  
  2717.  
  2718.  
  2719. Chapter 13: Extracting text strings
  2720. ===================================
  2721.  
  2722. The other day I received a letter on my bulletin board.
  2723. The writer wanted to know if there was a method to extract
  2724. parts of a text string and use it in a batch file.
  2725.  
  2726. I write this message to ask if either of you know a way to extract
  2727. portions of a text string using batch commands. If available, I could
  2728. eliminate use of the GWBASIC program referred to above, making the
  2729. program all-batch.
  2730.  
  2731. Can't help with extracting strings within a batch program except by
  2732. using some external program as you have done. But if you are only
  2733. interested in parsing the date, the following is an extract of a batch
  2734. program I saved from this conference that does that.
  2735.  
  2736. echo.|date>!!temp.bat
  2737. echo set today=%%4>current.bat
  2738. call temp.bat
  2739. del temp.bat
  2740. del current.bat
  2741. rem>%TODAY%.T$T
  2742.  
  2743. NOTE! Following lines beginning with "for" should be all on one line.
  2744. They just wouldn't fit that way in my editor. Also note that the line
  2745. beginning with "for %%y" handles years 1993 through 1999 only. You will
  2746. need to change this on January 1, 2000 <g>.
  2747.  
  2748. for %%m in (01 02 03 04 05 06 07 08 09 10 11 12) do if exist %%m-??-19.T$T set M=%%M
  2749. for %%d in (01 02 03 04 05 06 07 08 09 10) do if exist %M%-%%d-19.T$T
  2750. set D=%%d
  2751. for %%d in (11 12 13 14 15 16 17 18 19 20) do if exist %M%-%%d-19.T$T
  2752. set D=%%d
  2753. for %%d in (21 22 23 24 25 26 27 28 29 30 31) do if exist %M%-%%d-19.T$T
  2754. set D=%%d
  2755. for %%y in (3 4 5 6 7 8 9) do if "%TODAY%" == "%M%-%D%-199%%y" set Y=%%y
  2756. del %TODAY%.T$T
  2757. SET TODAY=
  2758. SET M=
  2759. SET D=
  2760. SET Y=
  2761.  
  2762. The code we're discussing looks like part of a date-formatting program.
  2763. I wrote such a batch program, setting DAY to Tue (or whatever), and
  2764. DATE to 05-29-1926 (or whatever), but I couldn't figure out how to
  2765. extract the components of DATE (ie. separate 05 from 29 from 1926)
  2766. with batch commands. So, my batch program calls a GWBASIC program
  2767. which does the extraction and conversion of month from numeral
  2768. to month-name, and sets the month-name. This lets me place in my
  2769. opening menu such gems as Tuesday the 8th of May 1926.
  2770.  
  2771. The basic program is fine, assuming every machine you run this on
  2772. has gwbasic.  if you want to keep everything DOS-ish, the way I
  2773. described is the way to go.  I'll try to explain it better:
  2774.  
  2775. echo @echo off > current.bat
  2776. echo @set day=%%3 >> current.bat
  2777. echo @set date=%%4 >> current.bat
  2778. echo. | date | find "Current" > gdate.bat
  2779. call gdate.bat < current.bat
  2780.  
  2781. Here goes:
  2782.  
  2783. The first three lines simply create another batch file.
  2784. It's contents are:
  2785.  
  2786.    @echo off
  2787.    @set day=%3
  2788.    @set date=%4
  2789.  
  2790. This batch file sets a var "day" and a var "date" based on
  2791. parameters passed to it, the 3rd and 4th specifically.
  2792.  
  2793. The 4th line of the first batch file creates a file containing
  2794. one line.  Here's the contents of gdate.bat:
  2795.  
  2796. Current date is Tue 02-12-93
  2797.  
  2798. Finally, the last line runs the batch file created, using
  2799. the contents of the 2nd file as -input- ... the %3 and %4
  2800. pick up "Tue" and "02-12-93" respectively.
  2801. It's a way of getting around an inefficiency in DOS.
  2802. From my point of view, using a program is fine, too.  That's
  2803. what PC's are for.
  2804.  
  2805. TODAY.BAT
  2806. =========
  2807. for %%m in (01 02 03 04 05 06 07 08 09 10 11 12) do IF exist %%m-??-19.T$T set M=%%M
  2808. for %%d in (01 02 03 04 05 06 07 08 09 10) do IF exist %M%-%%d-19.T$T set D=%%d
  2809. for %%d in (11 12 13 14 15 16 17 18 19 20) do IF exist %M%-%%d-19.T$T set D=%%d
  2810. for %%d in (21 22 23 24 25 26 27 28 29 30 31) do IF exist %M%-%%d-19.T$T set D=%%d
  2811. for %%y in (3 4 5 6 7 8 9) do IF "%TODAY%" == "%M%-%D%-199%%y" set Y=%%y
  2812. del %TODAY%.T$T
  2813. SET TODAY=
  2814. SET M=
  2815. SET D=
  2816. SET Y=
  2817.  
  2818.  
  2819. Chapter 14: Different batch enhancers and using scan codes
  2820. ==========================================================
  2821.  
  2822. This book will describe different utilities, batch
  2823. enhancers, shareware, public domain and the use of
  2824. scan codes that increase the flexibility and
  2825. functionality of batch files further.
  2826. Sharewares are like the book you are just reading:
  2827. You find these programs on bulletin boards and
  2828. internet all over the world and download them to
  2829. your own computer. Normally you can evaluate the
  2830. shareware for a certain time. Do you find the product
  2831. useful and will continue using it, you have to pay for
  2832. it. This is also what you have to do with the first program
  2833. I will discuss later in this book, GET.EXE
  2834.  
  2835.  
  2836. Chapter 15: Batch files and mail
  2837. ================================
  2838.  
  2839. I often visit different databases, bulletin boards and internet
  2840. to collect and get information. The information is automatically
  2841. loaded into my computer. The mail is read in my off-line
  2842. mailreader. I want it to fetch my off-line
  2843. mail packets from my download directory, place them in a mail directory
  2844. and start my mail reader.  Now, here's the tricky part.
  2845. I'd like it to rename, rather than overwrite any existing packets, and
  2846. I need it to be able to deal with packets from several BBSs at the
  2847. same time.
  2848.  
  2849. This is a batch file I've been working on. It seems to work okay when
  2850. dealing with mail from one BBS only.  I don't know enough about how
  2851. DOS handles these commands when dealing with multiple files to even
  2852. guess what might happen when there are several QWK packets involved.
  2853.  
  2854. I wonder if it might be better to rename the packets before reading them.
  2855. For general use, an on-screen message warning of impending deletions might
  2856. be better.  The beeps and .QQQ file extension meet my needs.
  2857.  
  2858. MAIL.BAT
  2859. ========
  2860.  
  2861. @ECHO OFF
  2862. CLS
  2863. rem if no new mail, just read old mail
  2864. IF NOT EXIST C:\ZDOWN\*.QWK GOTO READ
  2865.   rem
  2866.   rem fetch packets from d/l directory
  2867.   MOVE C:\ZDOWN\*.QWK C:\ZMAIL > NUL
  2868.   rem warn if old packets will be deleted after this session
  2869.   IF NOT EXIST C:\ZMAIL\*.QQQ GOTO READ
  2870.   rem beep.com, beeps speaker
  2871.   BEEP
  2872.   BEEP
  2873. :READ
  2874.   rem
  2875.   rem start mail reader
  2876.   C:\SLMR\SLMR.EXE
  2877.   rem if there was no new mail we are finished
  2878.   IF NOT EXIST C:\ZMAIL\*.QWK GOTO END
  2879.   rem delete oldest packets
  2880.   ECHO Y | DEL C:\ZMAIL\*.QQQ > NUL
  2881.   rem renumber packets
  2882. :QW3
  2883.   IF NOT EXIST C:\ZMAIL\*.QW3 GOTO QW2
  2884.   REN *.QW3 *.QQQ > NUL
  2885. :QW2
  2886.   IF NOT EXIST C:\ZMAIL\*.QW2 GOTO QW1
  2887.   REN *.QW2 *.QW3 > NUL
  2888. :QW1
  2889.   IF NOT EXIST C:\ZMAIL\*.QW1 GOTO QWK
  2890.   REN *.QW1 *.QW2 > NUL
  2891. :QWK
  2892.   IF NOT EXIST C:\ZMAIL\*.QWK GOTO END
  2893.   REN *.QWK *.QW1 > NUL
  2894. :END
  2895.   rem goodbye!
  2896.   CLS
  2897.  
  2898. Chapter 16: How to suppress the writing on the screen?
  2899. ======================================================
  2900.  
  2901. I keep most of my programs zipped in a directory called zips
  2902. and use this batch file to run them:
  2903.  
  2904. @echo off
  2905. md \temp
  2906. cd \temp
  2907. pkunzip c:\zips\anyname.zip
  2908. anyname.exe
  2909. pkzip /u c:\zips\anyname.zip
  2910. cd \
  2911. deltree /y c:\temp
  2912.  
  2913. This works just fine, but I would like to suppress the writing
  2914. on the screen of pkzip as it un-compresses I believe it involves
  2915. using >@ after the line " pkunzip c:\zips\anyname.zip >@
  2916. and this seems to work except that the @ keeps getting updated
  2917. when I close the program.
  2918.  
  2919. What I want is to  "> nul" to prevent screen writing while unzipping.
  2920.  
  2921. @echo off
  2922. md \temp
  2923. cd \temp
  2924. pkunzip c:\zips\anyname.zip  > nul
  2925. anyname.exe
  2926. pkzip /u c:\zips\anyname.zip
  2927. cd \
  2928. deltree /y c:\temp
  2929.  
  2930.  
  2931. The redirection command is > nul not >@.
  2932.  
  2933. The only thought about how to improve your batch file would be to use a
  2934. command line variable for the name of the zip file (anyname). If your
  2935. batch file, for example, is named dozip.bat, then you could call it with
  2936. dozip anyname and substitute the variable %1 where ever anyname appears
  2937. in your batch file. This would make the batch file general purpose for
  2938. any zip filename.
  2939.  
  2940.  
  2941. Chapter 17: How to have a batch file testing if Windows is running
  2942. ==================================================================
  2943.  
  2944. EXITING WINDOWS?
  2945.  
  2946. What is the best "Exit Windows" command?
  2947.  
  2948. Not sure if this is a help but there's a 8192 byte exe file
  2949. called Winexit.exe you could use as a quick exit from Windows. If put in
  2950. windows as an icon, you would double click it and you are back to dos.
  2951.  
  2952. If you are trying to automate a windows, have you tried the
  2953. key-stroke recorder in windows?
  2954. Have you heard or tried Winrun.exe? Its a program that lets you
  2955. start a windows program from the command line or a batch file. I have
  2956. one that goes right to Winfax.
  2957. If you are interested in Winexit.exe and can't find it let me
  2958. know and I'll send it to you as a debug script.
  2959. I use WinBatch from WilsonWindowWare to do this kind of thing.
  2960. It allows you to do just about anything you need and you can use the
  2961. included compiler to create .EXE files. I love this thing...
  2962.  
  2963. ...and it's cheap.
  2964.  
  2965. 1. I've found that Winclock does not allow me to run winexit.exe
  2966. as an alarm (although it can run all other programs as WP, Excel,
  2967. Becker tools Backup and many more. It even allows you to write lines to
  2968. these programs when starting them.
  2969.  
  2970. 2. I've got the DOS-version of my fax program, so I can simply
  2971. run my fax as an TSR and then make a batch-file calling the BBSs.
  2972.  
  2973. It's quite a tool.  I used it last week to run a PC maintenance program
  2974. on 100+ PCs notion wide. It contains most of the needed
  2975. logical expressions of a full programming language, with the simple
  2976. syntax of dos.  I tend to use it for the windows functions of my batch
  2977. files, where my batch file calls windows after replacing Startup.grp
  2978. with a new one including my winbatch .EXE. It is kind of shareware, but
  2979. you need to buy the full boat to get the compiler(well worth it!)
  2980.  
  2981. How to have a batch file test to see if Windows is running.
  2982. You know about using EXIT, but this program needs to be
  2983. executed from another shell that also employs the exit
  2984. command. Further, you need to echo a message to the user
  2985. if Windows is running. Well, you would take windows out
  2986. of the path statement, or move it to the end of the statement,
  2987. and insure that the following is in a path that occurs before
  2988. the windows......
  2989.  
  2990.  
  2991. @echo off
  2992. cls
  2993. prompt Type EXIT to return to Windows!$_$P$G
  2994. C:\WINDOWS\WIN %1 %2
  2995. prompt $P$G
  2996. cls
  2997.  
  2998.  
  2999. You can test if the variable windir exists:
  3000.  
  3001.         if '%windir%==' echo Not in Windows!
  3002.         if not '%windir%==' echo Windows running!
  3003.  
  3004.  
  3005. @echo off
  3006. cls
  3007. prompt Type EXIT to return to Windows!$_$P$G
  3008. C:\WINDOWS\WIN %1 %2
  3009. prompt $P$G
  3010. cls
  3011.  
  3012. Did you know you can do this with "set winpmt="?  That will
  3013. accomplish the same thing, except you don't need a batch file
  3014. to load win.
  3015.  
  3016. I use a simple utility called ISWIN (look for it on your favorite
  3017. BBS). When run in the batch file it returns an errorlevel that you
  3018. can test for and branch your batch file accordingly. Simple, easy
  3019. to use..
  3020.  
  3021. If you don't mind using a third party program, try out this
  3022. little number that I just whipped together for you:
  3023.  
  3024.  --- CUT ---
  3025. n iswin.com
  3026. e 0100 B8 80 46 CD 2F 3D 00 00 75 05 B0 01 EB 15 90 B8 00 16 CD 2F
  3027. e 0114 3C 00 74 09 3C 80 74 05 B0 01 EB 03 90 B0 00 B4 4C CD 21
  3028. rcx
  3029. 0027
  3030. w
  3031. q
  3032.  
  3033.  --- CUT ---
  3034.  
  3035. Save the text between those two '--- CUT ---' lines to a file
  3036. called ISWIN.ASC and compile it to a .COM file like so:
  3037.  
  3038.     DEBUG < ISWIN.ASC.
  3039.  
  3040.  This will create the file ISWIN.COM which you then include in
  3041. your batch file.  This file will set ERRORLEVEL to 1 if windows is
  3042. running, or 0 if not.  Here's a demo:
  3043.  
  3044.  --- CUT ---
  3045.  :* Example batch file to demo ISWIN.COM
  3046.  
  3047.  @ECHO OFF
  3048.  ISWIN
  3049.  IF NOT ERRORLEVEL 1 GOTO NoWin
  3050.  ECHO Windows is currently running.
  3051.  GOTO EndIt
  3052.  :NoWin
  3053.  ECHO Windows is *NOT* running.
  3054.  :Endit
  3055.  
  3056.  --- CUT ---
  3057.  
  3058. Interestingly enough, one of the windows
  3059. magazines I read, had a batch file for this sort of thing, that
  3060. set a environmental variable of something like set W=Y, and the
  3061. batch file looked for this variable if you were shelled out of
  3062. Windows to Dos, and tried to enter dos by typing WIN again.
  3063. Wonder why they just didn't have the batch file search for the
  3064. WINDIR variable.
  3065.  
  3066. One other way would be to pipe the output of MEM/C to FIND WIN. 
  3067. Again, try before you rely.
  3068.  
  3069. I assume that you mean to test for the presence of MS Windows
  3070. being "loaded" as apposed to a program running. For that purpose
  3071. there is the environmental variable "windir" which identifies
  3072. which directory the MS Windows program resides.  It only exists
  3073. when MS Windows has been loaded.  You would test for it as follows:
  3074.  
  3075. if "%windir%"=="C:\windows" [insert a command here]
  3076.  
  3077. Note that the correct case is important.  After loading MS
  3078. Windows, you can type "SET" at the DOS prompt to find the
  3079. correct directory and the exact case usage of "windir".
  3080.  
  3081. Exactly what were you referring to about knowing about EXIT usage?
  3082. Were you eluding to the fact that when your attempt to exit MS
  3083. Windows, open DOS programs are check for and identified as
  3084. running, inhibiting the closure of MS Windows.
  3085.  
  3086. I see I was a bit vague there.  Let me better explain.  First,
  3087. something you already know (for those that may not). When you
  3088. place something like %EVAR% into a batch file, DOS replaces all
  3089. occurrences of %EVAR% with the contents of the respective named
  3090. environment variable. So, if you have something like 'HOMEDIR=C:\FINN' in
  3091. your environment, then the batch file command 'CD %HOMEDIR%' is
  3092. translated to 'CD C:\FINN'.  If DOS cannot find an environmental variable
  3093. of that name, then it simply replaces it with nothing. (eg, if
  3094. HOMEDIR was not defined, then 'CD %HOMEDIR%' would just become 'CD '.)
  3095.  
  3096. Now, for the new stuff (maybe!).  DOS is CASE SENSITIVE when it
  3097. compares things (like environment variables, filenames, etc).
  3098. AND it turns everything it processes from command lines and batch
  3099. files into UPPER CASE (other that ECHO's and the like).  Therefore,
  3100. the line in your batch file:
  3101.  
  3102.  IF '%windir%==' echo Not in windows!
  3103.  
  3104.    becomes
  3105.  
  3106.  IF '%WINDIR%==' ECHO Not in windows!
  3107.  
  3108. Notice how the WINDIR environment variable *NAME* (not contents!)
  3109. has been converted to UPPER CASE there?  Now DOS searches for the
  3110. occurrence of *UPPER CASE* environment variable called WINDIR.
  3111.  
  3112. Do a SET from a DOS window and look at your environment
  3113. variables. The 'windir' variable is in lower case.  DOS,
  3114. though, is looking for it in UPPER CASE.  In DOS, upper
  3115. case 'WINDIR' is not the same as lower case 'windir'
  3116. (remember, COMMAND.COM is CASE sensitive!), so it
  3117.  replaces %WINDIR% with nothing.  As a result your line is
  3118. translated to:
  3119.  
  3120.  IF '==' ECHO Not in windows!
  3121.  
  3122.  every time!
  3123.  
  3124. Questions?
  3125. When you have registered your Run Batch Run Book you may get
  3126. support for your batch problems by sending email to the address
  3127. below.
  3128.  
  3129.          *** Finn Roaas, Oslo, Norway, internet: finnr@oslonett.no ***
  3130.  
  3131. Now, another method that comes to mind is to pipe a SET command
  3132. to FIND end search for "windir":
  3133.  
  3134.         SET | FIND "windir" > temp.fil
  3135.  
  3136. Next, one could use COPY to determine if the file is zero length.
  3137. Another way would be to pipe the output to a batch file, CALL
  3138. that file, then run the test as before (DOS will have set WINDIR from the
  3139. temporary batch file).  And, as I mentioned in another message, one could
  3140. search the output of MEM/C.
  3141.  
  3142.  
  3143.          if '%windir%==' echo Not in Windows!
  3144.          if not '%windir%==' echo Windows running!
  3145.  
  3146. Unless you are running NDOS/4DOS, this won't work, though. If you are
  3147. using NDOS/4DOS, be aware that you will be taking chances if you need
  3148. to run it on other machines!  Also, take a look at the little
  3149. ISWIN.COM which will do the job nicely.
  3150.  
  3151.  
  3152. Chapter 18: Invisible cursor
  3153. ============================
  3154.  
  3155. Is there an ANSI.SYS prompt to make the cursor invisible?
  3156. If you do not mind the cursor blinking just set the prompt to
  3157. prompt $H. This is the 'backspace' command for the prompt,
  3158. so it overwrites the C> default. If you DO mind the blinking
  3159. cursor you can use ansi to color the foreground and background
  3160. the same as your normal background color.
  3161.  
  3162.  
  3163. Chapter 19: Numbered repeats in batch files
  3164. ============================================
  3165.  
  3166. I have the following batch file to print labels...
  3167. LABEL.BAT
  3168. =========
  3169.  
  3170. :LOOP
  3171. COPY D.TXT lpt1
  3172. GOTO LOOP
  3173.  
  3174. and the file 'D." is
  3175.  
  3176. D.TXT
  3177. =====
  3178. Finn Roaas
  3179. Ole Reistads vei 39
  3180. N-1068 Oslo
  3181. NORWAY
  3182.  
  3183. Now, the batch file works perfectly, but with my printer
  3184. having a buffer, I'm not sure how many labels I'm gonna get.
  3185. If I don't press CTRL-BRK, I'll blow up the printer or it'll
  3186. go till we're all dead. How do I get the batch file above to
  3187. ask for a number to print, then print that many and quit?
  3188.  
  3189. There are a couple of ways:
  3190. 1. I can get a shareware program called GET which does
  3191. arithmetic within a batch.
  3192.  
  3193. 2. I can try modifying and incorporating the following batch
  3194. files:
  3195.  
  3196. CHANGEJ.BAT
  3197. ===========
  3198.  
  3199. Rem changej.bat
  3200. @echo off
  3201. REM Calling is done via:
  3202. REM CALL CHANGEJ 0 U  (increase)
  3203. REM CALL CHANGEJ 9 U  (decrease)
  3204. REM Variables H, T, U must be
  3205. REM initialized to single digits.
  3206. set X=%2
  3207. if %X%==U set O=%U%
  3208. if %X%==T set O=%T%
  3209. if %X%==H set O=%H%
  3210. set S=P
  3211. if %1==9 set S=M
  3212. goto %S%%O%
  3213. :P0
  3214. :M2
  3215. set V=1
  3216. goto Y
  3217. :P1
  3218. :M3
  3219. set V=2
  3220. goto Y
  3221. :P2
  3222. :M4
  3223. set V=3
  3224. goto Y
  3225. :P3
  3226. :M5
  3227. set V=4
  3228. goto Y
  3229. :P4
  3230. :M6
  3231. set V=5
  3232. goto Y
  3233. :P5
  3234. :M7
  3235. set V=6
  3236. goto Y
  3237. :P6
  3238. :M8
  3239. set V=7
  3240. goto Y
  3241. :P7
  3242. :M9
  3243. set V=8
  3244. goto Y
  3245. :P8
  3246. :M0
  3247. set V=9
  3248. goto Y
  3249. :P9
  3250. :M1
  3251. set V=0
  3252. :Y
  3253. set %X%=%V%
  3254. if "%X%"=="U" if %U%==%1 CALL changej %1 T
  3255. if "%X%"=="T" if %T%==%1 CALL changej %1 H
  3256. set J=%H%%T%%U%
  3257. for %%v in (N O S X) DO set %%v=
  3258.  
  3259. CNT.BAT
  3260. =======
  3261.  
  3262. REM Cnt.bat
  3263. @echo off
  3264. REM   CNT.bat to demonstrate
  3265. REM      CHANGEJ.bat
  3266. REM   =========================
  3267. for %%v in (U T H) DO set %%v=0
  3268. cls
  3269. echo This routine counts from 1 to
  3270. echo 12 and then backwards from 12
  3271. echo to 1. This is achieved using
  3272. echo DOS statements only. It sets
  3273. echo a variable J which may be used
  3274. echo for stack-handling. The range
  3275. echo of J is 000 through 999, but can
  3276. echo be enlarged easily.
  3277. echo.
  3278. echo Hit any key to go on ...
  3279. pause >nul
  3280. cls
  3281. :INCR
  3282. CALL changej 0 U
  3283. echo %J%
  3284. if not %J%==012 goto INCR
  3285. :DECR
  3286. CALL changej 9 U
  3287. echo %J%
  3288. if not %J%==001 goto DECR
  3289. :Z
  3290. for %%v in (U T H J) DO set %%v=
  3291.  
  3292. Neither of the above .bat files are mine. I picked them up some
  3293. time ago and unfortunately did not record the name of the author.
  3294.  
  3295. If you want plain dos and you don't want too many copies, or you
  3296. are prepared to execute the batch file several times, this would
  3297. do the job quick and dirty. Place the number of arguments on the
  3298. line (any character will do) for each time you want it executed.
  3299. Put 20 on the line, execute it, do an f3 to recopy the line, and
  3300. you got 40 labels.  Not pretty, but if you want something quick,
  3301. that will do it.
  3302.  
  3303. X.BAT
  3304. =====
  3305.  
  3306. @echo off
  3307. :loop
  3308. COPY D.TXT lpt1
  3309. GOTO LOOP
  3310. shift
  3311. if not '%1'=='' goto loop
  3312.  
  3313. Try this file I wrote called COUNT.BAT. It avoids having to use
  3314. any disk access and can easily be expanded out to whatever number
  3315. of digits you need to use. Simply pass the number of times to loop
  3316. as a command line variable.
  3317.  
  3318. COUNT.BAT
  3319. =========
  3320.  
  3321. @echo off
  3322. Rem Use this file as a basis for counting functions
  3323. Rem COUNT.BAT accepts variable %1 as the number of times to loop
  3324.  
  3325. Rem Initialize Place Holder Variables
  3326.  set d1=0
  3327.  set d2=0
  3328.  set d3=0
  3329.  
  3330. Rem Start the incrementing process
  3331. :incr
  3332.  if %count% == %1 goto incr_exit
  3333.  if %d1%%d2% == 00 goto 1digit
  3334.  if %d1%     == 0  goto 2digit
  3335.  set count=%d1%%d2%%d3%
  3336.  goto do
  3337.  
  3338. :1digit
  3339.  set count=%d3%
  3340.  goto do
  3341.  
  3342. :2digit
  3343.  set count=%d2%%d3%
  3344.  goto do
  3345.  
  3346. Rem Functions,programs, etc. to be looped %1 number of times
  3347. :do
  3348.  echo %count%
  3349.  
  3350. Rem Increment the 1s digit.  When it reaches ten, move on the 10s
  3351. increment
  3352. :incr_1
  3353.  if %d3% == 9 goto incr_10
  3354.  if %d3% == 8 set d3=9
  3355.  if %d3% == 7 set d3=8
  3356.  if %d3% == 6 set d3=7
  3357.  if %d3% == 5 set d3=6
  3358.  if %d3% == 4 set d3=5
  3359.  if %d3% == 3 set d3=4
  3360.  if %d3% == 2 set d3=3
  3361.  if %d3% == 1 set d3=2
  3362.  if %d3% == 0 set d3=1
  3363.  goto incr
  3364.  
  3365. Rem Reset 1s digit. Increment the 10s digit. When it reaches 100, move on
  3366. Rem to 100s increment
  3367. :incr_10
  3368.  set d3=0
  3369.  if %d2% == 9 goto incr_100
  3370.  if %d2% == 8 set d2=9
  3371.  if %d2% == 7 set d2=8
  3372.  if %d2% == 6 set d2=7
  3373.  if %d2% == 5 set d2=6
  3374.  if %d2% == 4 set d2=5
  3375.  if %d2% == 3 set d2=4
  3376.  if %d2% == 2 set d2=3
  3377.  if %d2% == 1 set d2=2
  3378.  if %d2% == 0 set d2=1
  3379.  goto incr
  3380.  
  3381. Rem Reset 10s digit. Increment the 100s digit.  When it reaches 1000, let
  3382. Rem the user know the counter is beyond capacity
  3383. :incr_100
  3384.  set d2=0
  3385.  if %d1% == 9 goto :incr_outofrange
  3386.  if %d1% == 8 set d1=9
  3387.  if %d1% == 7 set d1=8
  3388.  if %d1% == 6 set d1=7
  3389.  if %d1% == 5 set d1=6
  3390.  if %d1% == 4 set d1=5
  3391.  if %d1% == 3 set d1=4
  3392.  if %d1% == 2 set d1=3
  3393.  if %d1% == 1 set d1=2
  3394.  if %d1% == 0 set d1=1
  3395.  
  3396.  
  3397.  goto incr
  3398.  
  3399. Rem Let user know the file has looped beyond it's capacity
  3400. :incr_outofrange
  3401.  echo Count has gone beyond 999!
  3402.  beep
  3403.  
  3404. Rem Continue normal batch execution at this point
  3405. :incr_exit
  3406.  
  3407.  
  3408. Chapter 20: How you can write batch files that will execute
  3409.             certain commands based on the time of day?
  3410. ===========================================================
  3411.  
  3412. EXAMPLE .....some kind of "IF, ELSE" condition such as if the
  3413. time of day is 3pm then xxx will be executed.
  3414.  
  3415. I found the following debug script which creates a 10 byte executable
  3416. called HOUR.COM. When you run HOUR.COM it returns an errorlevel that is
  3417. the hour number in the 24 hour clock (11pm=23, etc.). You can then use
  3418. the errorlevel to control your batch file.
  3419.  
  3420. Extract the following between, but not including the lines to an ASCII
  3421. editor and save as HOUR.SCR in the directory in which you want the
  3422. HOUR.COM program to exist. Then at the command line for that directory
  3423. run debug < hour.scr to create the hour.com file.
  3424.  
  3425. HOUR.SCR
  3426. ========
  3427.  
  3428.  N HOUR.COM
  3429.  E 0100 B4 2C CD 21 88 E8 B4 4C CD 21
  3430.  RCX
  3431.  000A
  3432.  W
  3433.  Q
  3434.  
  3435.  
  3436. Look at the documentation for the GET H command in Bob Stephan's
  3437. BATch enhancer, GET.EXE. Look for GET25.ZIP on a BBS near you.
  3438. There are third-party utilities that return errorlevels based on the
  3439. time of day. For example, Bob Stephan's GET can return an errorlevel and
  3440. environment string based on the hour, minute or second:
  3441.  
  3442. GETCURRE.BAT
  3443. ============
  3444.  
  3445. rem Loop until 3:00 pm
  3446. :Loop
  3447. rem Get the current hour
  3448. get h 16
  3449. if not errorlevel 15 goto Loop
  3450. rem This will execute at or shortly after 3:00pm (more or less)
  3451. :MinLoop
  3452. get h 32
  3453. if not errorlevel 15 goto MinLoop
  3454. rem This will execute at 3:15pm +/- a second or so
  3455.  
  3456. You could toss together a "poor man's" version of the H subcommand of
  3457. GET by using the following DEBUG script, which produces a small COM file
  3458. (473 bytes) built around the DOS Int 21/2Ch function:
  3459.  
  3460. GETTIME.SCR
  3461. ===========
  3462.  
  3463. E165"GETTIME.COM" 0
  3464. E200"dTJ.BcEJn3qNZd165J2JIZIH3/mK6lLHwBJLU.06rVKNmJK18Y.GUo16GJ4Rp"
  3465. E23D"7bPn/mMp7bQZt4RUUqPp756VB56Z7bQj75PZNLNg/06UU0AisWAnYG18YEHUo"
  3466. E27A"16GJ4Rp7bPn/mMp7bQZt4RUoKOiJ5RZ/GMn/GNm7rPmlKNqJ4PUU0AisGBtYG"
  3467. E2B7"18YkIUo16GJ4Rp7bPn/mMp7bQZt4RUALNXxaPY/GMn/GNm7rPmlKNqJ4PUU0A"
  3468. E2F4"isGBtYG18E3OZ/0NZNKMpl4RUw4QoZqPi/GOn/0GioU08QIFIFJGBJ26q3X9k"
  3469. E331".16L7LOoFLNi/GAm.mHXFrPWJaQU2HCtE16GxaMZ75RU6Y9UA2PV7rOUkXQj7"
  3470. E36E"KNmFb9XlKMmh4Edt4NttmMjpaDBc.FjtKMoJ4NUErPU.LRWlKOX/0NjpKMdta"
  3471. E3AB"9Bc.78IYQmxaQgJaRZl46q34PpJ46dB56YE99B50g6/cD.0..oJ.c00.7Tn1G"
  3472. E3E8"pJ.Wcbi4.kHHpJ.W6bS2.knIpJUW4bC0.cv./USF..vzuGY.cr1.mECu2..hA"
  3473. E425"pQ6HNZIEhf0.s9..c9..Qzw6GNn0MID..ERlHf.8G7n0s2U01HnVAcz.ILwMd"
  3474. E462"ZLPBA.......3h7oQ6MBA"
  3475. E100 B8 0 3C BA 65 1 33 C9 CD "!rC" BE 0 2 50 BD D9 1 55 BF 88 90
  3476. E117 "W3" DB B1 FA 8A F0 80 C1 6 32 E4 AC "<9v" 8 "<Zv" 2 2C 6 2C
  3477. E12F 7 2C 2E E3 E8 D3 E0 A C6 AA 2 D8 92 "IIMu" E0 80 FB 3D 75 9 5A
  3478. E147 59 5B B4 40 CD 21 73 7 B4 9 BA 58 1 CD 21 CD 20 7 "Error!$"
  3479. G
  3480. Q
  3481.  
  3482. Here's how you could use GETTIME in a batch file:
  3483.  
  3484. GETTIME1.BAT
  3485. ============
  3486.  
  3487. rem Perform task after 12:34:56 pm
  3488. :Hour
  3489. gettime h
  3490. if not errorlevel 12 goto Hour
  3491. :Min
  3492. gettime m
  3493. if not errorlevel 34 goto Min
  3494. :Sec
  3495. gettime s
  3496. if not errorlevel 56 goto Min
  3497. rem Do task here at 12:34:56--accuracy basically depends
  3498. rem on disk access speed.
  3499.  
  3500. GETTIME reports the errorlevel to the console; if that bothers you,
  3501. redirect STDOUT to the NUL device (gettime h > nul). Good luck!
  3502.  
  3503. Recently a friend of mine got a new dx2 at work and he
  3504. installed some games and other useful programs.
  3505. But his boss was a little pissed at a couple employees that seem to
  3506. be more interested in playing than actually doing their jobs.
  3507. He wanted my friend to restrict their access.
  3508.  
  3509. What he would like to have was a batch file that,
  3510. when it started to run a program, it first checked
  3511. the time and if it was between 6am - 5pm would give
  3512. a message that this program will not operate during
  3513. business hours. He wanted to include a password that
  3514. will allow access.
  3515.  
  3516. I could put passwords in or just completely keep them out but
  3517. that would be bogus. He would just like to let them know in
  3518. an interesting way not to screw up a good thing.
  3519.  
  3520. The simplest way I know of to do this is to create a small
  3521. file called HOUR.COM (see the same file above) from the
  3522. following debug script (this script was originally
  3523. published by Brett Glass in InfoWorld several years ago).
  3524.  
  3525. HOUR.SCR
  3526. ========
  3527.  
  3528. N HOUR.COM
  3529. E100 B4 2C CD 21 88 E8 B4 4C CD 21
  3530. RCX
  3531. A
  3532. W
  3533. Q
  3534.  
  3535. If you put HOUR.COM in a directory on your path then you can use it
  3536. in your batch file. Hour sets an errorlevel to the current hour of the
  3537. day (with 0 for midnight and 23 for 11 pm). You can then test the
  3538. errorlevel in the next statements in your batch file, e.g.
  3539.  
  3540. RUNATTM.BAT
  3541. ===========
  3542. hour
  3543. if errorlevel 17 goto ok
  3544. if errorlevel 6 goto nogood
  3545. :ok
  3546. <put the commands here that will run the program being asked for>
  3547. goto end
  3548. :nogood
  3549. <put the commands or message here that you want to convey>
  3550. pause
  3551. :end
  3552.  
  3553. The errorlevel statements test for the argument or greater. If
  3554. errorlevel 17 indicates that the time is between 5pm (17 hours in
  3555. international time) and midnight, and will branch to the ok label and
  3556. run the program. The next statement, if errorlevel 6 indicates that the
  3557. time is 6am or greater, but that statement will not be executed if the
  3558. previous statement has been executed. If the errorlevel 6 statement is
  3559. executed, then the branch will be to the nogood label and your message
  3560. will be displayed until another key is struck at which time the batch
  3561. file will end and return to where it was called. If the hour is between
  3562. 0 and 5 neither errorlevel statement will be executed and the
  3563. command(s) in the ok label will be executed. Thus, all the hours you
  3564. are interested in are covered in the two errorlevel statements. In this
  3565. way a password is not necessary.
  3566.  
  3567. Also, a knowledgeable user would still be able to run the program
  3568. directly from a command prompt if he knew the command to run the
  3569. program. Even if you added password protection into a batch file, the
  3570. user would still have the same work around.
  3571.  
  3572. PC's are not secure machines.  Only baby-baby novices would
  3573. be fooled by a batch file that wouldn't allow access to a
  3574. program; nothing would prevent them from running it directly.
  3575.  
  3576. Personally, I'd disallow games on a business machine.
  3577.  
  3578. If you must, just leave the policing of the hours up to
  3579. management.  It's a simple matter of self-control on the part
  3580. of an employee, one that can be discussed at his next evaluation
  3581. if he can't stick to work during working hours.  Let the employee
  3582. know that's the deal.
  3583.  
  3584. The time you spend disabling a program through a batch file
  3585. will be wasted; it won't take long for anyone to see through it.
  3586.  
  3587.              
  3588. Chapter 21: Return to directory
  3589. ===============================
  3590.  
  3591. Using just Dos, there is an easy way to have a batch file return you to
  3592. the drive and subdirectory from which the batch file was started from.
  3593.  
  3594. Try the following, naming it anything except director.bat or go.bat
  3595.  
  3596. EXECUTE.BAT
  3597. ===========
  3598.  
  3599.  @echo off
  3600.  echo @echo off> director.bat
  3601.  echo set olddir=%%2>> director.bat
  3602.  dir | find "Directory"> go.bat
  3603.  call go
  3604.  if exist director.bat del director.bat
  3605.  if exist go.bat del go.bat
  3606.  <do whatever else you want to do here>
  3607.  cd %olddir% <this gets you back to the original directory>
  3608.  <do anything else you want to do here>
  3609.  
  3610. The environment variable olddir will hold the name of the directory from
  3611. which you called this .bat file. This file works because the dir command
  3612. has a heading that includes the line "Directory of <current pathname>".
  3613. The find statement finds this line and puts it in go.bat. When you call
  3614. go.bat it executes director.bat (the y is dropped since it is the 9th
  3615. character and not read by DOS). The pathname is the second variable on
  3616. the line and is therefore read into the olddir variable with the set
  3617. statement. The %% sign is needed since DOS eliminates a %sign every time
  3618. it reads the variable.
  3619.  
  3620. I think most people use a 3rd party program. Here's something that
  3621. will do the trick. The following DEBUG script will create PUSHPOP.LZH.
  3622. PUSHPOP is an LHA archive containing PUSHD.COM and POPD.COM. PUSHD is
  3623. installed as a TSR in AUTOEXEC.BAT. Once installed, it creates a
  3624. directory stack, and will save the location of the directory you are
  3625. currently in when you use it to change to a new directory.
  3626. When you wish to return to where you were, POPD "pops" the
  3627. previous location from the stack and restores you to it.
  3628. In a batch file, it would work like this:
  3629.  
  3630. WP.BAT
  3631. ======
  3632.  
  3633.    : WP.BAT - run WordPerfect
  3634.    @echo off
  3635.    : save current dir, and change to c:\wp
  3636.    pushd c:\wp
  3637.    wp
  3638.    : return to wherever you were when the batch file was invoked.
  3639.    popd
  3640.    : WP.BAT ends
  3641.  
  3642. To get PUSHPOP.LZH, type the following to a file called PUSHPOP.SCR,
  3643. and remove everything up to the "N PUSHPOP.LZH" line.  Then feed the
  3644. file to DEBUG with "DEBUG < PUSHPOP.SCR".  DEBUG will read the
  3645. information into memory and write out the PUSHPOP.LZH archive.  You will
  3646. need LHA 2.X to extract the contents.
  3647.  
  3648. PUSHPOP.SCR
  3649. ===========
  3650.  
  3651. N PUSHPOP.LZH
  3652. E 0100 22 58 2D 6C 68 34 2D 48 01 00 00 CD 02 00 00 33 75 8F 0D 20 01
  3653. E 0115 09 50 55 53 48 44 2E 43 4F 4D 7A 18 4D 00 00 01 2B 5A 77 16 25
  3654. E 012A FE FF F9 4F F1 08 36 08 38 A4 47 BF C0 D8 62 3E 4E 0A C1 52 84
  3655. E 013F 5C 94 E1 6A 52 A2 08 21 17 8A 49 14 3F 7F 8E 2C 6F 0E 1E 66 2C
  3656. E 0154 36 59 C1 61 B1 44 14 76 06 60 68 A0 EB 17 CB 04 2E AB 0D 59 2B
  3657. E 0169 1F 14 F1 05 E3 A5 E2 D5 44 08 C3 62 7A C0 43 4F 56 6E 8A B2 A6
  3658. E 017E 0F 5A 4C C9 B2 B4 A5 8E 31 32 00 F2 18 41 FE FE 72 47 69 83 0A
  3659. E 0193 C9 2F 91 20 B2 ED 76 17 F9 16 BE A7 6B E0 F5 E1 03 E3 9B 63 69
  3660. E 01A8 15 FD 20 A7 C7 67 C8 32 4A 5A 85 19 56 9D 42 8D 3D B1 9B 71 61
  3661. E 01BD CF 5C A5 5A 99 87 42 89 56 9E 6A 85 DF 24 5F DF F7 A3 4F 78 D3
  3662. E 01D2 A9 52 5A 81 22 BB 69 A6 3B 2B B1 71 F0 4E 93 2E B4 C2 F0 23 BD
  3663. E 01E7 A4 11 1C 15 D4 01 63 2A 10 6B 38 FB A8 0D E8 1D 42 CC 6F 10 EA
  3664. E 01FC 3F CE 69 5F A7 15 FB CB 71 5B FB 2C C8 84 1D D4 0C 8D 61 42 0E
  3665. E 0211 7F B8 BC 5E EA 18 62 41 4C 9C 11 2A 83 1A FB 3E 0C 80 8E 22 0B
  3666. E 0226 8C 83 9F 34 66 76 5D 8B CD E6 1D 44 C9 56 45 D4 02 68 07 1D BB
  3667. E 023B C8 37 80 75 0E 38 29 8A D2 59 27 52 BC 44 83 C2 2C 30 A3 6F A1
  3668. E 0250 0B 49 62 9D 4B 6E FE 50 F2 E3 83 8B B9 B9 4F 4F 75 0A DD F8 3D
  3669. E 0265 2F FC FD AD 02 31 D4 21 BE 2D 6C 68 34 2D E3 00 00 00 74 02 00
  3670. E 027A 00 33 75 8F 0D 20 01 08 50 4F 50 44 2E 43 4F 4D AD 5C 4D 00 00
  3671. E 028F 00 C4 5B 77 B1 A5 FE DD C5 06 1A 2E 8B 44 A0 4D 17 E4 8D 6E 8B
  3672. E 02A4 59 89 21 30 48 14 07 68 11 2B A8 72 9A 24 EE D3 E7 74 E8 53 34
  3673. E 02B9 28 99 0F 03 48 D0 D4 18 31 6D EA 8C BE AA DA 28 E2 41 F1 D9 F1
  3674. E 02CE 61 A4 00 09 00 BE 38 4B 07 5D DB 35 ED 5C 0B D6 2E 5D B4 FF 50
  3675. E 02E3 73 9B 99 A9 C7 48 D7 F9 FC 5B 5E 35 00 AD 01 BB B5 33 CF DB 0E
  3676. E 02F8 D3 F7 24 4E 10 3F 07 EA 2C 87 16 20 C0 90 EC 46 45 61 85 1D E6
  3677. E 030D E0 6D BE 5B 02 29 10 89 31 45 3A 20 AC 27 0B EB 11 3A 14 18 21
  3678. E 0322 13 DF 52 47 26 D8 DB 34 B9 A8 BE 79 D9 E9 23 3D A8 12 6A 51 EC
  3679. E 0337 CE C5 EF F4 C8 C5 EF 1B 4F 1E A2 FD 51 D7 E4 59 68 CD 52 60 D0
  3680. E 034C 6A 64 CD F8 F4 75 69 91 D2 2E 87 AF 81 74 7B CB D1 35 41 E2 92
  3681. E 0361 76 6A F8 DE 6B 2F CD 69 5C DB 29 CE 4D 7F 7B AA 80 00
  3682. RCX
  3683. 0273
  3684. W
  3685. Q
  3686.  
  3687. RETURN.BAT
  3688. ==========
  3689.  
  3690. @echo off
  3691. rem     Creates a batch file that restores current directory.
  3692. rem     Originally written by Vernon Frazee.
  3693.  
  3694. if %1!==! goto Usage
  3695. if %1!==/?! goto Usage
  3696. for %%a in (s S r R) do if %1==/%%a goto %%a
  3697. goto Usage
  3698.  
  3699. :S ave directory
  3700. echo @prompt CD $p$_$n: > %temp%curr_dir.bat
  3701. %comspec% /c %temp%curr_dir > %temp%restdir.bat
  3702. del %temp%curr_dir.bat
  3703. goto End
  3704.  
  3705. :R estore directory
  3706. if exist %temp%restdir.bat goto L1
  3707. echo @echo There is no previously stored path.>%temp%restdir.bat
  3708. :L1
  3709. call %temp%restdir
  3710. del %temp%restdir.bat
  3711. goto End
  3712.  
  3713. :Usage
  3714. echo.
  3715. echo Usage:   SAVEDIR /S or /R
  3716. echo Saves current directory or restores last saved directory.
  3717. echo    /S   Saves current directory and drive.
  3718. echo    /R   Restores last saved directory and drive.
  3719.  
  3720. :End
  3721.  
  3722. Actually, give this a try.  It requires no other package, and it not very
  3723. disk intensive.  I've named it RETURN.BAT and I call to it in my batch files.
  3724. At the beginning of the file you use "RETURN SET", and at the end just
  3725. "RETURN".  It's pretty quick, too, as long as you do not launch it from a
  3726. directory with hundreds of files.
  3727.  
  3728. (You can speed it up by changing the "dir *" to "dir ###", as long you don't
  3729. mind seeing the "No File Found" error message, or by directing the temporary
  3730. files to a ram disk)
  3731.  
  3732. RETURN2.BAT
  3733. ===========
  3734.  
  3735.  @echo off
  3736.  if "%1"=="set" goto setdrive
  3737.  if "%1"=="SET" goto setdrive
  3738.  %olddrive%:
  3739.  cd %olddir%
  3740.  goto end
  3741.  
  3742. :setdrive
  3743.  echo @echo off> volume.bat
  3744.  echo set olddrive=%%3>> volume.bat
  3745.  dir * | find "Volume in"> go.bat
  3746.  call go.bat
  3747.  
  3748. :setdir
  3749.  echo @echo off> director.bat
  3750.  echo set olddir=%%2>> director.bat
  3751.  dir * | find "Directory"> go.bat
  3752.  call go.bat
  3753.  
  3754. :clean
  3755.  if exist director.bat del director.bat
  3756.  if exist volume.bat del volume.bat
  3757.  if exist go.bat del go.bat
  3758.  goto end
  3759.  
  3760. :end
  3761.  
  3762.  
  3763. 4DOS has the ability to do this and it is built right in.
  3764.  
  3765. Chapter 22: Make a log with the time and date
  3766. =============================================
  3767.  
  3768. Okay, I want to make a batch file to create a "boot.log" file.
  3769.  
  3770. My computer is always on, except for power failures.
  3771. I wanted to make a line in the autoexec.bat something
  3772. like this:
  3773.  
  3774. TIME > TIME.TXT
  3775. COPY BOOT.LOG+TIME.TXT BOOT.LOG
  3776.  
  3777. Which should make the time enter line by line for each re-boot.  But,
  3778. the "enter new time" prompt makes this not work, because it waits for an
  3779. <enter> from the keyboard to continue. Here is a program in
  3780. QuickBasic that will do this.
  3781.  
  3782. It will append the time and date to "BOOT.LOG" every time you run it.
  3783. Here it is:
  3784.  
  3785. INFO.BAS
  3786. ========
  3787.  
  3788. DateText$ = "DATE: "                'You can change what's inside the
  3789. TimeText$ = "TIME: "                'double quotes if you want..but make
  3790.                                     'sure there's a space after it.
  3791.  
  3792. Dag$ = DATE$
  3793. Tid$ = TIME$
  3794. Null$ = ""
  3795.  
  3796. CLS
  3797.  
  3798. OPEN "C:\BOOT.LOG" FOR APPEND AS #1
  3799.   PRINT #1, DateText$; Dag$
  3800.   PRINT #1, TimeText$; Tid$
  3801.   PRINT #1, Null$                   'Make a blank line
  3802. CLOSE #1
  3803.  
  3804. SYSTEM                              'Return back to DOS when finished
  3805.  
  3806.    If you can't find anyone with QuickBasic 4.x that will compile this
  3807.    to an EXE for you, then you can run it through QBASIC that came with
  3808.    DOS.
  3809.  
  3810.    Add this line to your AUTOEXEC.BAT if you can't compile it to an EXE
  3811.    with QuickBasic 4.x...
  3812.  
  3813.    QBASIC /run INFO.BAS
  3814.  
  3815. I do something similar with a telephone dialing and logging batch file.
  3816. Here's how:
  3817.  
  3818. ECHO. | TIME | FIND "Current" >> BOOT.LOG
  3819.  
  3820. try: echo.|time > time.txt
  3821.  
  3822. You might want to do the same thing with date first, since I assume you
  3823. don't get a power failure every day and it will be hard to sort out the
  3824. time entries unless you also know the date.
  3825.  
  3826. Add the following lines to your AUTOEXEC.BAT
  3827.  
  3828. Echo. | Date | Find "Current" >> BOOT.LOG
  3829. Echo. | Time | Find "Current" >> BOOT.LOG
  3830.  
  3831. Which should make the time enter line by line for each re-boot.  But,
  3832. the "enter new time" prompt makes this not work, because it waits for an
  3833. <enter> from the keyboard to continue.
  3834.  
  3835. And old trick is to use the VER command to provide the needed carriage
  3836. return; e.g.,
  3837.  
  3838. VER|TIME > TIME.TXT
  3839.  
  3840. You could also include a pipe to FIND to just get the time line and
  3841. eliminate the new time line if you wanted to make it cleaner
  3842.  
  3843. ver|time|find "current">>boot.log
  3844.  
  3845. will append the time to your BOOT.LOG file. Each line will look similar
  3846. to the following:
  3847.  
  3848. Current time is 10:12:42.95a
  3849.  
  3850. You could make this as fancy as you wish--I'd suggest that you grab the
  3851. date and time as environment variables, which gives you as much
  3852. flexibility as you need when creating the log text:
  3853.  
  3854. GETDTVAR.BAT
  3855. ============
  3856.  
  3857. @echo off
  3858. rem GETDTVAR.BAT  - Written 24 November 1993  Robert Clark
  3859. rem Put current day, date, time into every LOGDAY, LOGDATE and LOGTIME
  3860. rem Assumed that the TEMP evar ends in a terminal backslash.
  3861. ver | date > %temp%gd.bat
  3862. echo set logday=%%3 >current.bat
  3863. echo set logdate=%%4 >>current.bat
  3864. call %temp%gd
  3865. ver | time>%temp%gd.bat
  3866. echo set logtime=%%3 >current.bat
  3867. call %temp%gd
  3868. del %temp%gd.bat>nul
  3869. del current.bat>nul
  3870.  
  3871. Your AUTOEXEC.BAT would then look something like this:
  3872.  
  3873. AUTOEXEC.BAT
  3874. ============
  3875.  
  3876. ...
  3877. call getdtvar
  3878. echo PC booted on %logday% %logdate% at %logtime%>>boot.log
  3879. ...
  3880.  
  3881. And your BOOT.LOG entry would look like this:
  3882.  
  3883. PC booted on Mon 07-18-1994 at 10:20:28.05a
  3884.  
  3885.  
  3886. @ECHO OFF
  3887. REM Records the date and time every time the PC is (re)booted
  3888. REM in the hidden file LOGTRAIL.TXT.
  3889.  
  3890. ECHO set currDate=%%3 %%4>CURRENT.BAT
  3891. ECHO.|date >CURRENT2.BAT
  3892. CALL CURRENT2
  3893.  
  3894. ECHO set currTime=%%3>CURRENT.BAT
  3895. ECHO.|time >CURRENT2.BAT
  3896. CALL CURRENT2
  3897.  
  3898. IF EXIST LOGTRAIL.TXT ATTRIB +h LOGTRAIL.TXT
  3899. ECHO %currDate%  %currTime%>>LOGTRAIL.TXT
  3900. ATTRIB +h LOGTRAIL.TXT
  3901.  
  3902. FOR %%v IN (currDate currTime) DO SET %%v=
  3903. DEL CURRENT?.BAT
  3904.  
  3905. ver|TIME|find /i/v "new" > time.txt
  3906.  
  3907. With 4DOS this makes a nice 1 line entry, with COMMAND.COM it
  3908. will be 2 lines.
  3909.  
  3910.  
  3911. Chapter 23: Books, magazines and programs about batch files
  3912. ===========================================================
  3913.  
  3914. DOS 6 Power Tools
  3915. PCMAGAZINE Lab Notes book batch files.
  3916. DOS RESOURCE GUIDE > DOS WORLD
  3917. Concise Guide to MS-DOS BATCH FILES  Kris Jamsa
  3918. Richardson, Ronny MS DOS Batch File Programming 4th. ed.
  3919. Richardson, Ronny Dr. Batch Files Ultimate Collection
  3920. Wolvorton, Van Supercharging MS DOS, Microsoft Press
  3921.  
  3922. Chapter 24: Remove file comment
  3923. ===============================
  3924.  
  3925. Some people like to remove the file_id.diz for zipped
  3926. files in a directory and add it as the comment to a zip
  3927. file of the same name (in one batch
  3928. file or call another batch file from it).
  3929.  
  3930. FILE_ID.BAT
  3931. ===========
  3932. IF %2 == ZIP GOTO ZIP
  3933. GOTO END
  3934. :ZIP
  3935. pkzip -z %1 <file_id.diz
  3936. :END
  3937.  
  3938.  
  3939. Chapter 25: FOR in batch files
  3940. ===============================
  3941. Let's look at a "FOR %%A IN (/%1)" construction.
  3942.  
  3943. When a list item begins with a slash, it gets processed
  3944. as two items. Thus in my tiny batch file :
  3945.  
  3946. FOR %%A IN (/%1) DO ECHO %%A
  3947. called as mybatch CCMAIL.SAM
  3948. I will see echoed     first:  C
  3949.                       then :  CMAIL.SAM
  3950.  
  3951. I want to test the first parameter of a batch file for the presence of a
  3952. file extent, and I'm going to use the presence of a period as proof.
  3953.  
  3954. So my batch file "really" wants to examine each character of the string
  3955. until it finds a period - in the example above, I want to stop after the
  3956. "L" and before the "S".
  3957.  
  3958. The logic in the loop needs to be : If I've got a period, ok, else examine
  3959. the remainder of the string.
  3960.  
  3961. Using {{  FOR %%A IN (/%1) DO IF "%%A"=="."  }}  won't work, because if
  3962. I'm looking at the first character (within the loop) I don't have access
  3963. to the string remainder (in order to recurs with the string remainder).
  3964. The technique breaks the string into "only" two parts.
  3965.  
  3966. Here's a (relatively) short batch file that will parse the drive and
  3967. path, filename, and extension. I found it a while ago, modified it a bit
  3968. and promptly forgot about it.
  3969.  
  3970. SPLITNAM.BAT
  3971. ============
  3972.  
  3973. :: PURPOSE: To extract the path, filename and extension from a
  3974. ::          filespecification and store the result in the environment
  3975. ::          variables FDIR, FNAM and FEXT respectively.
  3976. ::
  3977. :: REQUIRES: MS_DOS v6.xx    ::     SYNTAX: SPLITNAM filespecification
  3978. ::           MS_DOS v3.3x
  3979. :: LIMITATIONS: Filespecification must not exceed 29 characters.
  3980. :: Did not find file path correctly
  3981. :: Removed "." from FNAM & made FIND v3.3+ mods.   ::
  3982.  
  3983. @echo off
  3984. for %%s in (fdir fnam fext) do set %%s=
  3985. set x=%1
  3986. if "%x%"=="" goto error
  3987. :parse string
  3988. set y=%x%
  3989. for %%s in (/%x%) do set x=%%s
  3990. for %%i in (/%y%) do if "%%i%x%"=="%y%" set y=%%i
  3991.  
  3992. :: MS_DOS v3.3x version
  3993. echo %x%%y%|find "\">tmp
  3994. copy tmp+,,>nul
  3995. if not exist tmp if "%fext%"=="" if not %y%==. set fnam=%fnam%%y%
  3996. if exist tmp if not %y%==. if "%fnam%"=="" set fdir=%fdir%%y%
  3997.  
  3998. :: MS_DOS v6.xx version
  3999. :: echo %x%%y%|find "\">nul
  4000. :: if errorlevel 1 if "%fext%"=="" if not %y%==. set fnam=%fnam%%y%
  4001. :: if not errorlevel 1 if not %y%==. if "%fnam%"=="" set fdir=%fdir%%y%
  4002.  
  4003. if %y%==. set fext=%x%
  4004. if %fext%!==! goto parse
  4005. echo File path:         "%fdir%
  4006. echo File name:         "%fnam%
  4007. echo File extension:    "%fext%
  4008. :error message
  4009. if "%x%"=="" echo Missing parameter or out of environment space!
  4010. for %%s in (x y) do set %%s=
  4011.  
  4012.  
  4013. If you run MS-DOS v6.xx, clip out the MS_DOS v3.3x section and uncomment
  4014. the MS_DOS v6.xx code; you'll save a couple hundred milliseconds and
  4015. your hard drive will thank you.
  4016.  
  4017. TESTCHAR.BAT
  4018. ============
  4019.  
  4020.   REM TESTCHAR.BAT
  4021.   @ECHO OFF
  4022.   ::      (Based on PcMagazine Nov 8 1994 p287)
  4023.   ::      Given a string of characters as its only parameter
  4024.   ::              Jump to 80Found if one of them matches a period.
  4025.   ::      This batch file determines if a file extent was supplied!
  4026.   ::
  4027.   SET c=%2
  4028.   IF "%2"=="" set c=.
  4029.   IF "%1"==""      GOTO 90ended
  4030.   IF "%1"=="%c%"     GOTO 80found
  4031.   FOR %%a IN (/%1) DO IF NOT %%a==%1 CALL %0 %%a %c%
  4032.   GOTO 90ended
  4033.   :80found
  4034.   set x=
  4035.   goto 99exit
  4036.   :90ended
  4037.   set c=
  4038.   :99exit
  4039.   REM End of TESTCHAR.BAT
  4040.  
  4041. I wanted to take a diskette with multiple .zip files,
  4042. and be able to type "install", create a main directory on C:,
  4043. then create subdirectories by the zip file names
  4044. and unzip the files in each of their respective subdirectories.
  4045.  
  4046. I ended up with help from someone in Miami, and with 2 batch files.
  4047. Here's what I have:
  4048.  
  4049.  
  4050. rocknroll.bat ("Install" file launched from A:)
  4051. C:
  4052. CD\
  4053. MD main
  4054. A:
  4055. for %%f in (*.zip) do call A:\mdbat.bat %%f
  4056.  
  4057.  
  4058. mdbat.bat (2nd batch file)
  4059. C:
  4060. cd main
  4061. md %1
  4062. A:\pkunzip a:\%1 C:\main\%1
  4063.  
  4064.  
  4065. These work perfect.  There can be any .zip file on A: and it will create
  4066. a subdirectory by that file name.  The only confusing thing is the
  4067. subdirectory has the zip file name.  The tree would look like this:
  4068.  
  4069. C:\main\test01.zip\(All files unziped from test01.zip)
  4070.              |
  4071.          Directory
  4072.             Name
  4073.  
  4074.  
  4075. A bit crude, but it works!
  4076.  
  4077.  
  4078. @echo off
  4079. mkdir c:\main
  4080. for %x in (a:\*.zip) do mkdir c:\main\%x
  4081. for %x in (a:\*.zip) do copy a:\%x c:\main\%x%\
  4082. for %x in (a:\*.zip) do c:\util\zippers\pkunzip -d c:\main\%x%\%x
  4083. for %x in (a:\*.zip) do del c:\main\%x%\%x
  4084.  
  4085.  
  4086. What I didn't explain is that I have over 1,000 .zip files.
  4087.  
  4088. if [...] possible to write one batch file that will recognize the Zip
  4089. file name, make a main directory, make a directory(s) by the zip file(s)
  4090. name(s), and unzipp each file to it's respective directory.
  4091.  
  4092. Create this 17-line batch file C:\MAIN\RUN.BAT and execute by typing RUN
  4093.  
  4094. if not "%1" == "" goto sub
  4095. echo. > c:ww1.bat
  4096. :loop
  4097. pause insert next floppy or ^C to terminate
  4098. b:
  4099. for %%r in (*.zip) do expr "call run %%r" : \(.*\).ZIP >> c:ww1.bat
  4100. c:
  4101. call ww1.bat
  4102. del ww1.bat
  4103. goto loop
  4104.  
  4105. :sub
  4106. mkdir c:\main\%1
  4107. cd c:\main\%1
  4108. copy b:%1.zip c:
  4109. pkunzip -d %1
  4110. del c:\main\%1\%1.zip
  4111. cd c:\main
  4112.  
  4113. When entering the loop there is a pause for you to insert each new floppy.
  4114.  
  4115. The Unix style utility EXPR is not part of DOS, so ftp it from simtel:
  4116.  
  4117. ftp oak.oakland.edu /SimTel/msdos/calculat/
  4118. expr.zip      12380  901222  Unix-like command line expression evaluator
  4119. expr_vi2.zip   4497  940918  Tiny Unix 'expr'-like integer expr evaluator
  4120.  
  4121.  
  4122. Chapter 26: Ansi codes in batch file
  4123. ====================================
  4124.  
  4125. Try changing colors with the ECHO command rather the PROMPT
  4126. command. To that end I wrote a small batch file to try.  In
  4127. addition I used the DOS 6.0/6.2 CHOICE command to simplify
  4128. things.
  4129.  
  4130. NOTE: Replace the '$Esc' with an Escape character, Char 027.
  4131.  
  4132. TESTMENU.BAT
  4133. ============
  4134.  
  4135. :: TESTMENU.BAT
  4136. @ echo off
  4137. echo $Esc[0;34;47m
  4138. cls
  4139. echo  Test Menu
  4140. echo.
  4141. echo  1 = Option 1
  4142. echo  2 = Option 2
  4143. echo  3 = Option 3
  4144. echo  4 = Option 4
  4145. echo  X = Option 5
  4146. echo.
  4147. choice /c:1234x /n Your choice?
  4148.   if errorlevel 5 goto 5
  4149.   if errorlevel 4 goto 4
  4150.   if errorlevel 3 goto 3
  4151.   if errorlevel 2 goto 2
  4152.   if errorlevel 1 goto 1
  4153.  
  4154. :1
  4155.   echo $Esc[1;33;44m
  4156.   cls
  4157.   echo You selected Option 1 - Bright Yellow on Blue
  4158.   goto X
  4159.  
  4160. :2
  4161.   echo $Esc[1;37;44m
  4162.   cls
  4163.   echo You selected Option 2 - Bright White on Blue
  4164.   goto X
  4165.  
  4166. :3
  4167.   echo $Esc[1;36;44m
  4168.   cls
  4169.   echo You selected Option 3 - Bright Cyan on Blue
  4170.   goto X
  4171.  
  4172. :4
  4173.   echo $Esc[1;32;44m
  4174.   cls
  4175.   echo You selected Option 4 - Bright Green on Blue
  4176.   goto X
  4177.  
  4178. :5
  4179.   cls
  4180.   echo You selected Option 5 - No color change
  4181.  
  4182. :X
  4183.   echo.
  4184.  
  4185.  
  4186. Is it possible to make a batch file or DEBUG code to detect if ANSI.SYS is
  4187. loaded into memory? Well, let us view the following:
  4188.  
  4189.   file 1 C:\batches\br.bat
  4190.  
  4191.  
  4192.   @Echo off
  4193.   cls
  4194.   set DOSSESION=OK
  4195.   C:\batches\bprmmen\bprmen.bat
  4196.  
  4197.   file 2 C:\batches\bprmmen\bprmen.bat
  4198.  
  4199.  
  4200.   @Echo off
  4201.   C:\
  4202.      ^^^^ Replace with:
  4203.  
  4204.      C:
  4205.  
  4206.   cd\batches\bprmmen
  4207.   cls
  4208.   prompt $e[47;34m
  4209.      ^^^^^^^^^^^^^
  4210.      When you say prompt, you are actually changing the DOS ENVIRONMENT,
  4211.      a less permanent way to do it is:
  4212.  
  4213.      Echo <esc>[47;34m
  4214.            ^^^  ASCII char #27
  4215.  
  4216.   Echo  Welcome to the BBC Backup and Restore Main Menu System.
  4217.   Echo.
  4218.   Echo  You can:
  4219.   Echo.
  4220.   Echo  1. Go to the BBC Backup Menu System,
  4221.   Echo  2. Go to the BBC Restore Menu System,
  4222.   Echo  3. Set the current drive at C:, then exit this system, or
  4223.   Echo  4. Set the current drive at D:, then exit this system.
  4224.   Echo.
  4225.        Prompt *$h Enter the number of your choice.:
  4226.        if %DOSSESION%==OK goto dos
  4227.        goto end
  4228.        :dos
  4229.        if %DOSSESION%==OK set DOSSESION=NOTOK
  4230.        c:\dos\command.com
  4231.        :end
  4232.  
  4233.       Again we are misusing the prompt command. What we should do is have
  4234.       a command line controlled file.
  4235.       
  4236. The problem is that are trying to use the PROMPT command for
  4237. everything, from changing the DOS PROMPT, to changing the COLOR,
  4238. to using it as a PROMPT for questions. Here are some ideas:
  4239.  
  4240. Instead of using prompt $e try using echo <esc> it is much
  4241. safer and runs faster.
  4242.  
  4243. PC Magazine's BATCHMAN.COM has an option which can check to see
  4244. if ANSI.SYS is loaded, January 30, 1990.
  4245.  
  4246. And, of course, if you have 4DOS you can check the %_ansi built-in
  4247. variable. If it returns 1 you've got ANSI.
  4248.  
  4249. COLROCHT.BAT
  4250. ============
  4251.  
  4252. @echo off
  4253. echo `[0m`[2J`[30;47m`[K`[1;10HA N S I   C o l o r   C h a r t`[s
  4254. echo `[u  ■  Courtesy of Sleepy Hollow
  4255. echo `[0m`[5CNote: An ESC character (not shown here)`[s
  4256. echo `[u must precede the left bracket
  4257. echo `[30;47m`[4;33H Normal Colors `[0m
  4258. for %%x in (0 1 2 3 4 5 6 7) do echo `[5;%%x1H`[40;3%%xm [0;3%%x;40m
  4259. for %%x in (0 1 2 3 4 5 6 7) do echo `[6;%%x1H`[41;3%%xm [0;3%%x;41m
  4260. for %%x in (0 1 2 3 4 5 6 7) do echo `[7;%%x1H`[42;3%%xm [0;3%%x;42m
  4261. for %%x in (0 1 2 3 4 5 6 7) do echo `[8;%%x1H`[43;3%%xm [0;3%%x;43m
  4262. for %%x in (0 1 2 3 4 5 6 7) do echo `[9;%%x1H`[44;3%%xm [0;3%%x;44m
  4263. for %%x in (0 1 2 3 4 5 6 7) do echo `[10;%%x1H`[45;3%%xm [0;3%%x;45m
  4264. for %%x in (0 1 2 3 4 5 6 7) do echo `[11;%%x1H`[46;3%%xm [0;3%%x;46m
  4265. for %%x in (0 1 2 3 4 5 6 7) do echo `[12;%%x1H`[47;3%%xm [0;3%%x;47m
  4266. echo `[30;47m`[14;33H Bright Colors `[1m
  4267. for %%x in (0 1 2 3 4 5 6 7) do echo `[15;%%x1H`[40;3%%xm [1;3%%x;40m
  4268. for %%x in (0 1 2 3 4 5 6 7) do echo `[16;%%x1H`[41;3%%xm [1;3%%x;41m
  4269. for %%x in (0 1 2 3 4 5 6 7) do echo `[17;%%x1H`[42;3%%xm [1;3%%x;42m
  4270. for %%x in (0 1 2 3 4 5 6 7) do echo `[18;%%x1H`[43;3%%xm [1;3%%x;43m
  4271. for %%x in (0 1 2 3 4 5 6 7) do echo `[19;%%x1H`[44;3%%xm [1;3%%x;44m
  4272. for %%x in (0 1 2 3 4 5 6 7) do echo `[20;%%x1H`[45;3%%xm [1;3%%x;45m
  4273. for %%x in (0 1 2 3 4 5 6 7) do echo `[21;%%x1H`[46;3%%xm [1;3%%x;46m
  4274. for %%x in (0 1 2 3 4 5 6 7) do echo `[22;%%x1H`[47;3%%xm [1;3%%x;47m
  4275. echo `[22H`[0;37;40m
  4276. pause>nul
  4277.  
  4278. The "for in" batch file syntax is a little hairy at first - it's an
  4279. optimization. Let's translate one line for you:
  4280.  
  4281. for %%x in (0 1 2 3 4 5 6 7) do echo `[5;%%x1H`[40;3%%xm [0;3%%x;40m
  4282.  
  4283. .... in long format ...:
  4284.  
  4285.       echo `[5;01H`[40;30m [0;30;40m
  4286.       echo `[5;11H`[40;31m [0;31;40m
  4287.       echo `[5;21H`[40;32m [0;32;40m
  4288.       echo `[5;31H`[40;33m [0;33;40m
  4289.       echo `[5;41H`[40;34m [0;34;40m
  4290.       echo `[5;51H`[40;35m [0;35;40m
  4291.       echo `[5;61H`[40;36m [0;36;40m
  4292.       echo `[5;71H`[40;37m [0;37;40m
  4293.                ^        ^      ^
  4294.                |        |      |
  4295. Formerly:     %%x      %%x    %%x
  4296.  
  4297.  
  4298. See? For each "%%x" in the statement "`[5;%%x1H`[40;3%%xm [0;3%%x;40m"
  4299. we've replaced the "%%x" with the value "in" (0 1 2 3 4 5 6 7). This is
  4300. what happens during run time of the batch file.
  4301.  
  4302. You can see how much longer this post would have been if each line was
  4303. expanded this way!
  4304.  
  4305. One last note:  You should replace all the " ` " characters with the
  4306. escape character (ASCII 27) before running. With a good editor (like
  4307. QEdit) this can be accomplished in a single "find & replace" command.
  4308.  
  4309. Is it possible to make a batch file or DEBUG code to detect if
  4310. ANSI.SYS is loaded into memory?
  4311.  
  4312. I think you can. You may use...
  4313.  
  4314. CHKANSI.BAT
  4315. ===========
  4316.  
  4317. MEM/C > TEMP.TMP
  4318. FIND "ANSI" TEMP.TMP
  4319.  
  4320. More info and examples on this can be found in this chapter
  4321. in a new version of the book.
  4322.  
  4323. For a little more flexible method try this :
  4324.  
  4325. @echo off
  4326. mem /m ansi|find "not currently" /i > nul
  4327. if errorlevel 1 goto ansi loaded
  4328. :noansi
  4329. echo ANSI.SYS is not loaded.
  4330. rem {you can also add any code you want executed
  4331. rem to accommodate ANSI not being loaded}
  4332. goto quit
  4333. :ansiloaded
  4334. echo ANSI.SYS is loaded.
  4335. rem --the rest of your batch file--
  4336. :quit
  4337.  
  4338. Sometime ago I needed a small Util that will
  4339. restore the normal ANSI settings to my computer after a program.
  4340. How about the one that is built in with DOS?
  4341. MODE CO80  seems to do wonders for me...Except, it doesn't work
  4342. in all cases. So, there are other solutions.
  4343. Here is a script for a small utility that may help.
  4344.  
  4345. CLEAR.SCR
  4346. =========
  4347.  
  4348. n clear.com
  4349. e 0100  B4 12 B3 10 CD 10 B8 40 00 8E D8 B8 00 06 B7 1F
  4350. e 0110  29 C9 B6 18 80 FB 10 74 04 8A 36 84 00 8A 16 4A
  4351. e 0120  00 FE CA CD 10 B4 02 8A 3E 62 00 29 D2 CD 10 C3
  4352. rcx
  4353. 0030
  4354. w
  4355. q
  4356.  
  4357. :: Clears screen to bright white on blue.
  4358. :: ANSI.SYS not required.
  4359.  
  4360. To create CLEAR.COM type the script in your favourite editor
  4361. and save it as CLEAR.SCR. Then at the DOS prompt type:
  4362. DEBUG < CLEAR.SCR and press Enter.  Note: The blank line
  4363. after "q" is necessary.
  4364.  
  4365. If you wish, you can change the colors. To do so choose your
  4366. hex color code, nn, from the list.  For example, the default
  4367. color scheme is 1F, blue background and bright white text.
  4368.  
  4369.    Color           Background  Foreground
  4370.    -----           ----------  ----------
  4371.    Black             0           0
  4372.    Blue              1           1
  4373.    Green             2           2
  4374.    Cyan              3           3
  4375.    Red               4           4
  4376.    Magenta           5           6
  4377.    White             7           7
  4378.  
  4379.    Gray              -           8
  4380.    Bright Blue       -           9
  4381.    Bright Green      -           A
  4382.    Bright Cyan       -           B
  4383.    Bright Red        -           C
  4384.    Bright Magenta    -           D
  4385.    Yellow            -           E
  4386.    Bright White      -           F
  4387.  
  4388. Then in the directory where CLEAR.COM is stored enter:
  4389.  
  4390. DEBUG CLEAR.COM
  4391. E 010F nn
  4392. W
  4393. Q
  4394.  
  4395.  
  4396. Is it possible to display (Echo) the date and time in a batch file
  4397. without having respond to it?
  4398.  
  4399. Such as in a heading line, etc..  Is there a function to do this?
  4400. You might be interested in this nayways.
  4401. Add ANSI.SYS to your config.sys (if it's not already there), and
  4402. use this for your prompt:
  4403.  
  4404. Set Prompt=$e[s$e[1;1H$e[K$e[34;40;1m$e[32mToday is $e[35m$d $e[32m& the time is $e[35m$t$h$h$h$h$h$h$e[32m.$e[34m$e[u$e[37m$p$g
  4405.  
  4406. All of this goes on one line, and you have to put it in your config.sys,
  4407. and take the PROMPT command out of your autoexec.bat. It will display a header
  4408. containing the date and time whenever you're at the DOS prompt.
  4409.  
  4410. Chapter 27: About errorlevel
  4411. ============================
  4412.  
  4413. I'm using a simple key reading program to get Y or N and return an
  4414. errorlevel.
  4415. For example:
  4416. @echo off
  4417. echo Choose Y or N
  4418. batchman getkey "YN"
  4419. if errorlevel 1 echo YES
  4420. if errorlevel 2 echo NO
  4421. pause
  4422.  
  4423.  
  4424. I know the right errorlevel values are returned but if "N" is pressed
  4425. YES and NO are both echo'd.
  4426. How come?
  4427.  
  4428. Because "IF ERRORLEVEL 1" means "if the return code is 1 or higher".
  4429. If your return code is 2, then both of the above lines are true, since
  4430. 2 is greater than or equal to both 1 and 2.  So both ECHO YES and ECHO
  4431. NO are executed.  What you want to do is use a GOTO command to make
  4432. DOS execute only the lines you want to execute.  Something like:
  4433. IF ERRORLEVEL 2 GOTO TWO
  4434. IF ERRORLEVEL 1 GOTO ONE
  4435. GOTO ZERO
  4436. :TWO
  4437. ECHO NO
  4438. GOTO END
  4439. :ONE
  4440. ECHO YES
  4441. GOTO END
  4442. :ZERO
  4443. WHATEVER
  4444. :END
  4445. Always, always, always remember that in a situation like this, you
  4446. must test for the higher return codes first. If you put
  4447. IF ERRORLEVEL 1 GOTO ONE first, then the batch file would ALWAYS
  4448. "GOTO ONE" since the return code is ALWAYS (unless your program
  4449. does return a 0 under some conditions) 1 or higher, so that
  4450. command would ALWAYS be interpreted as "true".  DOS would
  4451. never even see an IF ERRORLEVEL 2 command if it came after
  4452. the IF ERRORLEVEL 1 command. You need to always write those
  4453. tests for errorlevel descending.
  4454.  
  4455.  if errorlevel 2 echo YES
  4456.  if errorlevel 1 echo NO
  4457.  
  4458. Errorlevels need to be checked from high to low not vice versa. An
  4459. errorlevel number is really equal to or greater than the number shown.
  4460. Also, you need to do something that will skip the next errorlevel check
  4461. by using a goto label command on the error level line. Your file should
  4462. read something like this:
  4463.  
  4464. if errorlevel 2 goto two
  4465. if errorlevel 1 goto one
  4466. :two
  4467. echo NO
  4468. goto end
  4469. :one
  4470. echo YES
  4471. goto end
  4472. :end
  4473. pause
  4474.  
  4475.  
  4476. A bad copy doesn't change the errorlevel in 6.22.
  4477. COPY is an internal command and as such does not return any kind of
  4478. errorlevel (and never has).  Note that 4DOS does provide a way to test
  4479. the errorlevel of an internal command (while this may not be useful to
  4480. you, it may keep someone else from telling me that 4DOS is better than
  4481. sliced bread).
  4482.  
  4483. XCOPY does return an errorlevel (see the DOS HELP on XCOPY for its
  4484. errorlevels and what they mean).
  4485.  
  4486.  
  4487. Chapter 28: Rebooting from a batch file
  4488. =======================================
  4489.  
  4490. A DOS statement that can be typed at
  4491. the prompt (or put into a batch file)
  4492. that will re-boot the system:
  4493.  
  4494.                 echo G=FFFF:0 | debug > nul
  4495.  
  4496.  
  4497.  
  4498.  Method 1: echo HPS >%temp%reboot.com
  4499.            %temp%reboot
  4500.  
  4501.  Note that the " " character is ASCII 203.  In order to avoid having
  4502.  multiple copies of REBOOT.COM lying around, I suggest that the TEMP evar
  4503.  be set to a RAMDisk (preferably) or at least to a junk directory.
  4504.  
  4505.  Use this method if you're not certain that REBOOT.COM already exists in
  4506.  the current directory or path.
  4507.  
  4508.  If anyone's interested, here's the disassembly of the "HPS " string:
  4509.  
  4510.  xxxx:0100 48            DEC     AX  ; AX=FFFF                  "H"
  4511.  xxxx:0101 50            PUSH    AX  ; Save FFFF to stack       "P"
  4512.  xxxx:0102 53            PUSH    BX  ; Save 0000 to stack       "S"
  4513.  xxxx:0103 CB            RETF        ; RETF pops two bytes      " "
  4514.                                      ; from stack and resumes
  4515.                                      ; execution at that address.
  4516.                                      ; So, this RETF passes control
  4517.                                      ; to FFFF:0000, which initiates
  4518.                                      ; a reboot.
  4519.  
  4520.  Method 2: echo g=ffff:0|debug
  4521.  
  4522.  Pretty much the same thing, but eliminates a lot of the overhead.  Note
  4523.  that the only thing written to disk will be the temp file created from
  4524.  the pipe. There will be no .COM file created.  DEBUG.EXE must be in the
  4525.  path or current directory.  Again, if you have a TEMP evar set, the temp
  4526.  file will be written to that directory rather than to the current one.
  4527.  
  4528.  The nice thing about this method is that you don't need to create or use
  4529.  an external REBOOT.COM utility.
  4530.  
  4531.  Method 3: reboot
  4532.  
  4533.  Yet another variation on a theme. This particular REBOOT.COM will always
  4534.  perform a warm boot.  By changing the word at offset 0109 to 0000, you
  4535.  can force a cold boot.  Use the following DEBUG script to create
  4536.  REBOOT.COM, which you should then place in your path:
  4537.  
  4538. REBOOT.SCR
  4539. ==========
  4540.  n reboot.com
  4541.  a100
  4542.  mov dx,0040               ; Set up 40:072 then jump to boot
  4543.  mov ds,dx
  4544.  mov word ptr [0072],1234  ; Use 1234h for warm boot; 0000h for cold
  4545.  jmp ffff:0                ; Jump to boot routine
  4546.  
  4547.  rcx
  4548.  10
  4549.  w
  4550.  q
  4551.  
  4552.  Note that several shareware BATch enhancement utilities such as GET or
  4553.  BATCHMAN provide command line switches that allow you to reboot a
  4554.  computer under BATch file control.
  4555.  
  4556.  None of the reboot methods I've outlined will protect you from a staged
  4557.  write disk cache--to be truly robust, these programs would have to flush
  4558.  the cache before proceeding.  Better to do that yourself _before_
  4559.  executing REBOOT.COM.  For SmartDrv, the syntax to flush the cache is
  4560.  SMARTDRV /C.
  4561.  
  4562.    You might try the following:
  4563.  
  4564.     1) Exit from all your programs (nothing running in the background)
  4565.     2) Make sure your disk cache has dumped everything to disk.  If you are
  4566.        using smartdrv the command is smartdrv /c
  4567.     3) Then typing:
  4568.  
  4569.          echo g=ffff:0000|debug
  4570.  
  4571.        will cause most PC's to do a COLD boot (restart with POST).
  4572.  
  4573.     If that didn't work on your particular PC, change "3)" above to:
  4574.  
  4575.       ECHO HPS[Alt-203]>COLDBOOT.COM
  4576.       COLDBOOT
  4577.  
  4578.     Note: The "[Alt-203]" means while holding down the [Alt] key type
  4579.           203 on the keys on the numeric keypad (not the keys at the
  4580.           top of the keyboard), and then release the [Alt] key. Doing
  4581.           so will produce ASCII character 203 which looks like a little
  4582.           double-line "T" character.
  4583.  
  4584. Suppose I'd like to set up a multi-boot disk. Suppose I want it to
  4585. regularly boot up with my normal setup.  However, every now and then,
  4586. I like to play some games that need more memory, so I have a separate
  4587. boot disk for them. I'd like to be able to hold a key down or
  4588. something and get my "game" boot up.
  4589.  
  4590. NORMAL AUTOEXEC.BAT:
  4591. ====================
  4592. @ECHO OFF
  4593. LH /L:0;1,45504 /S C:\DOS\SMARTDRV.EXE /V
  4594. LH /L:1,16560 c:\misc\mouse
  4595. LH /L:1,3952 C:\MISC\S64DDPMS b9 s10 o15
  4596. LH /L:1,24096 MODE LPT1:,,B
  4597. LH /L:1,85536 C:\EXPLORER.4L\status\stat4l
  4598. LH /L:1,25920 STACKEY /B225/
  4599. PROMPT $e[1;33;44m(%%@dosmem[k]k) $p$g
  4600. Path C:\;C:\DOS;C:\WINDOWS;C:\XTGOLD;C:\MISC;C:\EXPLORER.4L;C:\TM
  4601. cd\
  4602. cls
  4603. SET TEMP=C:\TEMP
  4604. SET TMP=C:\TEMP
  4605.  
  4606. GAME AUTOEXEC.BAT:
  4607. ==================
  4608. @ECHO OFF
  4609. PROMPT (boot disk) $P$G
  4610. PATH C:\;C:\DOS;C:\WINDOWS;C:\XTGOLD;C:\MISC;C:\TM
  4611. LH /L:0;1,45472 /S C:\DOS\SMARTDRV /V
  4612. LH /L:1,16560 C:\MISC\MOUSE
  4613. SET TEMP = C:\TEMP
  4614.  
  4615. NORMAL CONFIG.SYS
  4616. =================
  4617. DEVICE=C:\DOS\HIMEM.SYS
  4618. DEVICE=C:\DOS\EMM386.EXE NOEMS NOMOVEXBDA
  4619. BUFFERS=4
  4620. FILES=60
  4621. DOS=UMB
  4622. LASTDRIVE=D
  4623. FCBS=4,0
  4624. DEVICEHIGH C:\DOS\ANSI.SYS
  4625. DEVICEHIGH C:\SCANW\M1904.SYS D3 I5 A2AB S7
  4626. STACKS=9,256
  4627. DOS=HIGH
  4628. SHELL=C:\4DOS.COM /P
  4629.  
  4630.  
  4631. GAME CONFIG.SYS
  4632. ===============
  4633. DEVICE=C:\DOS\HIMEM.SYS
  4634. DEVICE=C:\DOS\EMM386.EXE 6144 RAM FRAME=E000 I=CC00-EFFF
  4635. BUFFERS=4,0
  4636. FILES=60
  4637. DOS=UMB
  4638. LASTDRIVE=E
  4639. FCBS=4,0
  4640. DOS=HIGH
  4641. STACKS = 9,256
  4642. SHELL=A:\4DOS.COM /P
  4643.  
  4644. Use Configuration Blocks in your config.sys & autoexec.bat.  This was
  4645. new in DOS 6.0 and is well described in the User manual/ Upgrade book.
  4646. In the DOS 6.20 on-line Help scheme, it is partially described under
  4647. the Include command.
  4648.  
  4649. I use a scheme I started years ago: I have a directory with sets of
  4650. config.sys & autoexec.bat files and a reboot.bat file that selects a
  4651. set, renames & copies the files into the C: root as config.sys &
  4652. autoexec.bat, and then reboots the system.
  4653.  
  4654.  CONFIG.SYS ....
  4655.  
  4656. [menu]
  4657. menuitem normal,NORMAL SYSTEM CONFIGURATION
  4658. menuitem games,GAMES SYSTEM CONFIGURATION
  4659.  
  4660. ; you can set the menu colors to what ever you like
  4661. ; 0 - 15 for foreground colors
  4662. ; 0 - 7 for background colors
  4663. ; I'll use bright white (15) on blue (1) for menu colors
  4664.  
  4665. menucolor 15,1
  4666.  
  4667. ; set this time-out and default as you like
  4668. ; I'll pause for 10 seconds then boot normal if no key is pressed
  4669.  
  4670. menudefault normal 10
  4671.  
  4672. [normal]
  4673. DEVICE=C:\DOS\HIMEM.SYS
  4674. DEVICE=C:\DOS\EMM386.EXE NOEMS NOMOVEXBDA
  4675. BUFFERS=4
  4676. FILES=60
  4677. DOS=UMB
  4678. LASTDRIVE=D
  4679. FCBS=4,0
  4680. DEVICEHIGH C:\DOS\ANSI.SYS
  4681. DEVICEHIGH C:\SCANW\M1904.SYS D3 I5 A2AB S7
  4682. STACKS=9,256
  4683. DOS=HIGH
  4684. SHELL=C:\4DOS.COM /P
  4685.  
  4686. [games]
  4687. DEVICE=C:\DOS\HIMEM.SYS
  4688. DEVICE=C:\DOS\EMM386.EXE 6144 RAM FRAME=E000 I=CC00-EFFF
  4689. BUFFERS=4,0
  4690. FILES=60
  4691. DOS=UMB
  4692. LASTDRIVE=E
  4693. FCBS=4,0
  4694. DOS=HIGH
  4695. STACKS = 9,256
  4696. SHELL=A:\4DOS.COM /P
  4697.  
  4698.  Note that in config.sys a line beginning with a semicolon
  4699.  is a remark line.
  4700.  
  4701.  
  4702.  And AUTOEXEC.BAT....
  4703.  
  4704. @ECHO OFF
  4705.  
  4706. IF %config%==normal GOTO normal
  4707. IF %config%==games GOTO games
  4708.  
  4709. :normal
  4710.  LH /L:0;1,45504 /S C:\DOS\SMARTDRV.EXE /V
  4711.  LH /L:1,16560 c:\misc\mouse
  4712.  LH /L:1,3952 C:\MISC\S64DDPMS b9 s10 o15
  4713.  LH /L:1,24096 MODE LPT1:,,B
  4714.  LH /L:1,85536 C:\EXPLORER.4L\status\stat4l
  4715.  LH /L:1,25920 STACKEY /B225/
  4716.  PROMPT $e[1;33;44m(%%@dosmem[k]k) $p$g
  4717.  Path C:\;C:\DOS;C:\WINDOWS;C:\XTGOLD;C:\MISC;C:\EXPLORER.4L;C:\TM
  4718.  cd\
  4719.  cls
  4720.  SET TEMP=C:\TEMP
  4721.  SET TMP=C:\TEMP
  4722.  goto end
  4723.  
  4724. :games
  4725.  DEVICE=C:\DOS\HIMEM.SYS
  4726.  DEVICE=C:\DOS\EMM386.EXE 6144 RAM FRAME=E000 I=CC00-EFFF
  4727.  BUFFERS=4,0
  4728.  FILES=60
  4729.  DOS=UMB
  4730.  LASTDRIVE=E
  4731.  FCBS=4,0
  4732.  DOS=HIGH
  4733.  STACKS = 9,256
  4734.  SHELL=A:\4DOS.COM /P
  4735.  
  4736. :end
  4737.  
  4738.  (if you are not familiar with labels...)
  4739.  Note the goto end at the end of the normal autoexec.bat section.
  4740.  and the :end label at the end. If you add more boot setups, you
  4741.  need to have a goto end after each one (except the last) to jump
  4742.  over the ones you don't want.
  4743.  
  4744. CONFIG.SYS:
  4745.  
  4746. [Menu]
  4747. menuitem=Normal, Normal setup
  4748. menuitem=Game, Game setup
  4749. menudefault=Normal,10
  4750.  
  4751. [Normal]
  4752. DEVICE=C:\DOS\HIMEM.SYS
  4753. DEVICE=C:\DOS\EMM386.EXE NOEMS NOMOVEXBDA
  4754.  
  4755. [Game]
  4756. DEVICE=C:\DOS\HIMEM.SYS
  4757. DEVICE=C:\DOS\EMM386.EXE 6144 RAM FRAME=E000 I=CC00-EFFF
  4758.  
  4759. [Common]
  4760. BUFFERS=4,0
  4761. FILES=60
  4762. DOS=UMB
  4763. LASTDRIVE=E
  4764. FCBS=4,0
  4765. DOS=HIGH
  4766. STACKS = 9,256
  4767. SHELL=A:\4DOS.COM /P
  4768. (end of CONFIG.SYS)
  4769.  
  4770.  
  4771. AUTOEXEC.BAT:
  4772.  
  4773. if "%CONFIG%" == "GAME" goto Game
  4774.  
  4775. @ECHO OFF
  4776. LH /L:0;1,45504 /S C:\DOS\SMARTDRV.EXE /V
  4777. LH /L:1,16560 c:\misc\mouse
  4778. LH /L:1,3952 C:\MISC\S64DDPMS b9 s10 o15
  4779. LH /L:1,24096 MODE LPT1:,,B
  4780. LH /L:1,85536 C:\EXPLORER.4L\status\stat4l
  4781. LH /L:1,25920 STACKEY /B225/
  4782. PROMPT $e[1;33;44m(%%@dosmem[k]k) $p$g
  4783. Path C:\;C:\DOS;C:\WINDOWS;C:\XTGOLD;C:\MISC;C:\EXPLORER.4L;C:\TM
  4784. cd\
  4785. cls
  4786. SET TEMP=C:\TEMP
  4787. SET TMP=C:\TEMP
  4788. goto End
  4789.  
  4790. :Game
  4791. @ECHO OFF
  4792. PROMPT (boot disk) $P$G
  4793. PATH C:\;C:\DOS;C:\WINDOWS;C:\XTGOLD;C:\MISC;C:\TM
  4794. LH /L:0;1,45472 /S C:\DOS\SMARTDRV /V
  4795. LH /L:1,16560 C:\MISC\MOUSE
  4796. SET TEMP = C:\TEMP
  4797.  
  4798. :End
  4799. (end of AUTOEXEC.BAT)
  4800.  
  4801.  
  4802. Chapter 29: How to execute a batch file on a certain weekday?
  4803. =============================================================
  4804.  
  4805. Let's say you need to defrag and backup your hard drive ever
  4806. 3 days to 7 days... is there something that'll run as either a TSR or a
  4807. a nightly event which will keep track how many days it's been since it
  4808. last ran the defragger and backup and either end itself, or running the
  4809. programs and then end every third day.
  4810.  
  4811. Here is a batch solution since this was setup for my system
  4812. make sure that you check the path pointers. c:\bin, and c:\temp.
  4813. Just change these directories to directories that you use.
  4814. You will also need to create a separate batch file for each
  4815. day of the week.  SUN.BAT, MON.BAT, TUE.BAT etc..
  4816.  
  4817. If you have dos6?  you can use "command /y /c" and watch this work.
  4818.  
  4819.  
  4820. CHECKDAT.BAT
  4821. ============
  4822.  
  4823. @echo off
  4824. ::   this file checks the system date and can be used in other batch
  4825. ::   files.  This file must be called from from autoexec.bat.
  4826. ::   ONCEDAY.BAT needs to find this file.
  4827.  
  4828. echo.|date>C:\bin\currdat.txt
  4829. if not exist c:\bin\lastdat.txt goto NEWDAY
  4830. fc c:\bin\currdat.txt c:\bin\lastdat.txt|find /i "no">nul
  4831. if errorlevel 1 goto NEWDAY
  4832. if errorlevel 0 goto SAMEDAY
  4833.  
  4834. :NEWDAY
  4835. copy c:\bin\currdat.txt c:\bin\lastdat.txt>nul
  4836. CALL ONCEDAY.BAT
  4837.  
  4838. :SAMEDAY
  4839. DEL C:\BIN\CURRDAT.TXT
  4840.  
  4841. ONCEDAY.BAT
  4842. ===========
  4843.  
  4844. @echo off
  4845. ::   CHECKDAT.BAT must be called from autoexec.bat
  4846. ::   the next 4 lines can be used to run an event once a week
  4847.  
  4848. :NOTTODAY
  4849. :: put ONCEDAY commands here
  4850. call c:bin\dow.bat
  4851.  
  4852. DOW.BAT
  4853. =======
  4854.  
  4855. @echo off
  4856. ::  This is DOW.BAT
  4857. C:
  4858. cd\
  4859. VER|DATE|FIND "Current" > C:\TEMP\TEMP.BAT
  4860. ECHO SET DAYNOW=%%3 > C:\TEMP\CURRENT.BAT
  4861. ECHO SET DATENOW=%%4 >> C:\TEMP\CURRENT.BAT
  4862. CD\TEMP
  4863. CALL TEMP
  4864. CD\bin
  4865. call %DAYNOW%
  4866.  
  4867.  
  4868. Chapter 30: Y/N in batch files
  4869. ===============================
  4870.  
  4871. NO CHOICE
  4872. Batch File Tip
  4873.  
  4874. The addition of the CHOICE command to MS-DOS 6 makes it easy
  4875. to obtain a Y or N response from the user. Here is a way to
  4876. do it if you don't have DOS 6, or you want to create a stand-
  4877. alone batch file that works with earlier DOS versions.
  4878.  
  4879. Y&N.BAT
  4880. =======
  4881.  
  4882. @ECHO off
  4883. :: Get Y/N response using DOS 5 or less.
  4884. REM> $.tmp
  4885. ECHO Question [Y/N]?
  4886. DEL $.tmp /p>nul
  4887. IF NOT EXIST $.tmp GOTO yes
  4888. DEL $.tmp
  4889. GOTO no
  4890. :no
  4891. ECHO Response was "n" or "N".
  4892. GOTO end
  4893. :yes
  4894. ECHO Response was "y" or "Y".
  4895. ::GOTO end
  4896. :end
  4897.  
  4898. So, how does it work? It's actually fairly simple. Line 3
  4899. creates $.tmp, a 0-byte file in the current directory. Using
  4900. the DELete command with /p in line 5 causes DOS issue a Y/N
  4901. prompt which is not seen because it is redirected to nul. The
  4902. batch file then branches according to the users response by
  4903. testing in line 6 for the existence of the temporary file.
  4904. (The line numbers are for reference only and are not to be
  4905. included when entering this batch file into your computer.)
  4906.  
  4907. For comparison, here is an equivalent file written using the
  4908. DOS 6 CHOICE command.
  4909.  
  4910.     @ECHO off
  4911.     :: Get Y/N response using DOS 6 CHOICE command.
  4912.      CHOICE "question "
  4913.      :: N=2  Y=1
  4914.      IF ERRORLEVEL 2 GOTO no
  4915.      IF ERRORLEVEL 1 GOTO yes
  4916.     :no
  4917.      ECHO Response was "n" or "N".
  4918.      GOTO end
  4919.     :yes
  4920.      ECHO Response was "y" or "Y".
  4921.      ::GOTO end
  4922.     :end
  4923.  
  4924. But it will only work with DOS 4.0
  4925. and later, since the DEL command didn't have a /P switch
  4926. before that. A variant of that will work back to DOS
  4927. 2.0 (before that, too bad!) is to do something like:
  4928.  
  4929.         md yntstdir
  4930.         cd yntstdir
  4931.         rem > $.tmp
  4932.         echo question [Y/N]
  4933.         del *.* > nul
  4934.         if exist $.tmp goto no
  4935.         cd ..
  4936.         rd yntstdir
  4937.         ::do whatever for a Y response
  4938.         goto end
  4939.         :no
  4940.         del $.tmp > nul
  4941.         cd ..
  4942.         rd yntstdir
  4943.         ::do whatever for a N response
  4944.         :end
  4945.  
  4946. Same idea. Not as elegant (if batch programming like
  4947. this can be called elegant) but whatever it works...
  4948.  
  4949. I took the beep out of CHOICE.COM. Inside there is a notice that CHOICE
  4950. requires MS-DOS version 4.0 or later. Maybe the best bet for 4.0 users
  4951. is to get a copy of CHOICE.
  4952.  
  4953. Chapter 31: Remap keys
  4954. ======================
  4955.  
  4956. There is a way to remap keys, but it's almost certain that the remapping
  4957. will have no effect on your program. I have several of my keys remapped in
  4958. DOS, but I've only seen one program that responded to the new key
  4959. functions. In fact, I was not happy to find that it did so, as the
  4960. functions were DOS commands.  Perhaps you could find a TSR to do it for
  4961. you.  If you want to try it anyway, here's how to do it.
  4962.  
  4963. There are several ways to accomplish your desired task.  Most publicized
  4964. and IMHO least desirable is by using the PROMPT command as follows.  This
  4965. will remap SHIFT-F10 as the command "EXIT".  The $E in the following
  4966. command represents the escape character. In your AUTOEXEC.BAT or a called
  4967. batch file type:
  4968.  
  4969. ECHO ON
  4970. PROMPT $E[0;93;"EXIT";13p
  4971. @ECHO OFF
  4972.  
  4973. Using an editor that will generate the escape character, you can do that a
  4974. little more efficiently by simply typing the following.  I will also
  4975. explain the parts here.
  4976.  
  4977. ECHO `[0;93;"EXIT";13p
  4978.      |  |     |    | |
  4979.      |  |     |    | |---- Command code that makes this a keyboard
  4980.      |  |     |    |           redefinition.
  4981.      |  |     |    |------ The ENTER key.
  4982.      |  |     |----------- This text + the ENTER code make up the new key
  4983.      |  |                      definition.  The quotes will not appear
  4984.      |  |                      when you press the key.
  4985.      |  |----------------- The key being redefined.
  4986.      |-------------------- The escape character.
  4987.                            I used the ` for the escape character because I
  4988.                            want to be able to post this on nets that don't
  4989.                            allow special characters.  I will continue to do
  4990.                            this.  The actual character is a left pointing
  4991.                            arrow.
  4992.  
  4993. To generate the escape character in DOS EDIT and in many if not most other
  4994. editors, press CTRL-P and then ESC.  Another way to get it is to hold down
  4995. the ALT key and type in 27 on the numeric keypad.
  4996.  
  4997. My favorite way to do keyboard redefinition is to put the definitions in a
  4998. separate file and use the TYPE command to evoke them.  That way, you are
  4999. not cluttering up your batch files with cryptic commands, and you stand
  5000. less of a chance of accidentally damaging one of the codes while editing
  5001. your batch files.  Here is my KEYCODE.FIL.
  5002.  
  5003. ---------------------------------------------------------------------
  5004. Redefining function keys.
  5005.  
  5006.  SHIFT-F1 = CLS                         `[0;84;"CLS";13p
  5007.  SHIFT-F2 = DELTEMP                     `[0;85;"DELTEMP";13p
  5008.  SHIFT-F4 = XTREE                       `[0;87;"XTREE";13p
  5009.  SHIFT-F5 = DIR                         `[0;88;"DIR";13p
  5010.  SHIFT-F6 = DIR E:\DLOAD                `[0;89;"DIR E:\DLOAD";13p
  5011.  SHIFT-F7 = DIR A:                      `[0;90;"DIR A:";13p
  5012.  SHIFT-F8 = DIR B:                      `[0;91;"DIR B:";13p
  5013.  SHIFT-F9 = MENU                        `[0;92;"MENU";13p
  5014. SHIFT-F10 = EXIT                        `[0;93;"EXIT";13p
  5015.       F11 = PICKUP                      `[0;133;"PICKUP";13p
  5016.       F12 = HANGUP                      `[0;134;"HANGUP";13p
  5017. ---------------------------------------------------------------------
  5018.  
  5019. Above I have put text strings in for the new definitions, but you could put
  5020. other keys in as well.  If you're running dos earlier than 6.0, you'll have
  5021. to look in your DOS manual for the ANSI sequences you need. With 6.x, you
  5022. have to go into the help under ANSI.SYS.  Make sure the line,
  5023. "DEVICE=C:\DOS\ANSI.SYS" is in your CONFIG.SYS file.  This assumes that
  5024. your DOS files, including ANSI.SYS, are in the C:\DOS directory.
  5025.  
  5026. If you want to remap the 0/Ins key (on the numbers pad) to act as "I"
  5027. you also want to remap the Numbers pad Enter key to act as PgDn.
  5028. Or maybe you only want to do this for one program.
  5029.  
  5030. Uh, one problem -- on the PC, there is no difference in the scan codes
  5031. for the keypad <ENTER> and the normal <ENTER>.  Ditto with the <INS> key.
  5032.  
  5033. But, ignoring that, here's the batch file -- and it will ONLY work if
  5034. you have ANSI.SYS being loaded via your CONFIG.SYS file, and NumLock is
  5035. ON.
  5036.  
  5037.         _______________________________________________________________
  5038.  
  5039.         @ECHO OFF                       ; Suppress the echo of commands
  5040.         SET OLDPRMT=%PROMPT%            ; Save the current DOS prompt
  5041.         PROMPT=$e[;48;"I"p              ; Use DOS prompt to re-assign key
  5042.         ECHO ON                         ; Display the prompt
  5043.         ECHO OFF                        ; Turn the prompt back off
  5044.         PROMPT=$e[;13;0;81p             ; 0;81 is the scan code for <PgDn>
  5045.         ECHO ON                         ; Display the prompt
  5046.         ECHO OFF                        ; Turn the prompt back off
  5047.         RUNFILE.EXE                     ; Run the program
  5048.         PROMPT=$e[;73;48p               ; Use DOS prompt to retore key
  5049.         ECHO ON                         ; Display the prompt
  5050.         ECHO OFF                        ; Turn the prompt back off
  5051.         PROMPT=$e[0;81;13p              ; Restore other key
  5052.         ECHO ON                         ; Display the prompt
  5053.         ECHO OFF                        ; Turn the prompt back off
  5054.         PROMPT=%OLDPRMT%                ; Restore the DOS prompt
  5055.         SET OLDPRMT=                    ; Remove OLDPRMT from memory
  5056.         _______________________________________________________________
  5057.  
  5058. I believe this will work. As a manner of practice have ANSI.SYS
  5059. loaded.  Also, it may not work as most program
  5060. read the keyboard directly, bypassing ANSI.SYS.
  5061.  
  5062.  
  5063. Chapter 33: Detecting DblSpace drive
  5064. ====================================
  5065.  
  5066. The following information is provided for whomever asked, though I don't
  5067. remember who it was.
  5068.  
  5069. How to Detect a DoubleSpace Drive from a Batch File
  5070.  
  5071. The information applies to:
  5072. - Microsoft MS-DOS operating system version 6.0
  5073.  
  5074. SUMMARY
  5075. =======
  5076. MS-DOS batch files cannot distinguish between compressed drives and
  5077. uncompressed drives. However, you can use the MS-DOS Debug utility to
  5078. create a program that sets an errorlevel depending on whether a drive
  5079. is compressed with DoubleSpace. An MS-DOS batch file can then test
  5080. this errorlevel to determine whether the drive is a DoubleSpace-
  5081. compressed drive.
  5082.  
  5083. NOTE: Microsoft Product Support Services does not provide support for
  5084. writing the Debug script or batch file discussed in this article, or
  5085. troubleshoot problems related to compiling, running or using this
  5086. program or batch file. For more information on DoubleSpace
  5087. programming, see the Microsoft Application Note "MS-DOS DoubleSpace
  5088. Compressed Volume File (CVF) Format" (PD0836).
  5089.  
  5090. This Application Note can be found in the Software/Data Library by
  5091. searching on the word PD0836 or S14196. PD0836 was archived using the
  5092. PKware file-compression utility.
  5093.  
  5094. You can also obtain this Application Note by calling Microsoft Product
  5095. Support Services at (206) 454-2030.
  5096.  
  5097. MORE INFORMATION
  5098. ================
  5099. This following is an example of how to use the MS-DOS Debug utility to
  5100. create a program file called ISDBL.COM. ISDBL.COM determines the
  5101. following:
  5102.  
  5103.  - Whether DoubleSpace is loaded in memory
  5104.                  -and-
  5105.  - Whether a specified drive is a DoubleSpace-compressed drive
  5106.  
  5107. ISDBL.COM returns the following errorlevels:
  5108.  
  5109.    Results                         Errorlevel
  5110.    ------------------------------------------
  5111.    DoubleSpace compressed drive         1
  5112.    DBLSPACE.BIN is not loaded           0
  5113.    Invalid drive                        0
  5114.    Other errors                         0
  5115.  
  5116. NOTE: ISDBL.COM tests the current drive if no drive is specified on
  5117. the command line.
  5118.  
  5119. Creating ISDBL.COM
  5120. ------------------
  5121. ISDBL.COM is created using a Debug script file, which contains all
  5122. the commands you would enter from within DEBUG to create ISDBL.COM.
  5123.  
  5124. To create ISDBL.COM, follow these steps exactly:
  5125.  
  5126. 1. Create a text file called C:\ISDBL.SCR using a text editor (such as
  5127.    Windows Notepad; MS-DOS Editor or Qedit). This is the Debug script file.
  5128.    C:\ISDBL.SCR should contain the following lines exactly as they
  5129.    appear, including the blank line after the INT 21 line and before the
  5130.    RCX line.
  5131.  
  5132.    NOTE: Press the ENTER key at the end of each line below.
  5133.  
  5134. ISDBL.SCR
  5135. =========
  5136.       A 100
  5137.       MOV AX,2901
  5138.       MOV SI,81
  5139.       MOV DI,012D
  5140.       INT 21
  5141.       MOV DL,[012D]
  5142.       DEC DL
  5143.       JGE 0119
  5144.       MOV AH,19
  5145.       INT 21
  5146.       MOV DL,AL
  5147.       MOV AX,4A11
  5148.       MOV BX,1
  5149.       INT 2F
  5150.       MOV AX,4C00
  5151.       AND BL,80
  5152.       JZ 012B
  5153.       INC AL
  5154.       INT 21
  5155.  
  5156.       RCX
  5157.       AE
  5158.       N ISDBL.COM
  5159.       W
  5160.       Q
  5161.  
  5162.    NOTE: You MUST press the ENTER key twice after the last "INT 21" line
  5163.    and once after the "Q" at the end of the Debug script.
  5164.  
  5165. 2. From the MS-DOS command prompt on drive C, enter the following
  5166.    command to create the ISDBL.COM program:
  5167.  
  5168.       DEBUG < ISDBL.SCR
  5169.  
  5170.    Debug reads and follows the instructions in the ISDBL.SCR file. It is
  5171.    recommended that you do not use this command from within Windows or
  5172.    when other programs are running. If ISDBL.SCR contains an error, Debug
  5173.    probably is not told when to quit; therefore, you will have to restart
  5174.    your system. Debug may even be instructed to cause your system to stop
  5175.    responding (hang). If this happens, restart your system and examine
  5176.    ISDBL.SCR for accuracy.
  5177.  
  5178.    If there are no errors in ISDBL.SCR, a few screens of information are
  5179.    displayed, ending with
  5180.  
  5181.       <nnnn>:012B INT 21
  5182.       <nnnn>:012D
  5183.       -RCX
  5184.       CX 0000
  5185.       :AE
  5186.       -N ISDBL.COM
  5187.       -W
  5188.       Writing 000AE bytes
  5189.       -Q
  5190.  
  5191.    where <nnnn> is a combination of letters and numbers, the exact
  5192.    combination of which varies. The remaining information should be
  5193.    exactly as above if ISDBL.COM was compiled correctly.
  5194.  
  5195.    Debug places the ISDBL.COM file in the current directory, which in the
  5196.    example above is C:\. It should be 174 bytes in size.
  5197.  
  5198. Using ISDBL.COM
  5199. ---------------
  5200. You can now run the ISDBL.COM program from within a batch file to get
  5201. information about a specific drive. Below is an example batch file:
  5202.  
  5203. DBLTEST.BAT
  5204. ===========
  5205.  
  5206.    @ECHO OFF
  5207.    REM This batch file uses ISDB.COM to test a drive to see if it
  5208.    REM was compressed with DoubleSpace.
  5209.    REM
  5210.    REM DBLTEST.BAT assumes that ISDBL.COM in in the current
  5211.    REM directory or a directory on the MS-DOS Path.
  5212.    REM
  5213.    REM The syntax for running this batch file is:
  5214.    REM    DBLTEST <drive>:
  5215.    REM
  5216.    REM where <drive>: is the name of the drive to test, for example C:
  5217.    REM If no drive is specified, the current drive is tested.
  5218.    REM
  5219.    ISDBL %1
  5220.    IF NOT ERRORLEVEL 1 GOTO FAILURE
  5221.    ECHO The drive %1 is a DoubleSpace compressed drive.
  5222.    GOTO END
  5223.    :FAILURE
  5224.    ECHO The drive %1 is not a DoubleSpace compressed drive.
  5225.    :END
  5226.  
  5227. How ISDBL Works
  5228. ---------------
  5229. In determining whether the drive is compressed, ISDBL assumes that
  5230. DoubleSpace is running.
  5231.  
  5232. ISDBL checks the specified drive by using Interrupt 2F, function 4A11.
  5233. This function is the DSGetDriveMapping application programming
  5234. interface (API) call for DoubleSpace. If the drive is compressed, then
  5235. Bit 7 of BL will be set. Otherwise, it is zero. This result is simply
  5236. returned at the end of ISDBL.
  5237.  
  5238. REFERENCES
  5239. ==========
  5240. "MS-DOS DoubleSpace Compressed Volume File (CVF) Format," Application
  5241. Note PD0836
  5242.  
  5243. Chapter 34: How to ADD a path to the existing path?
  5244. ===================================================
  5245.  
  5246. Sometimes you need to be able to add a path to an already existing
  5247. path.  You tried the following, but it didn't work:
  5248.  
  5249. rem existing path
  5250. path=c:\dos
  5251.  
  5252. rem path to be appended
  5253. path=c:\wp;%path%;
  5254.  
  5255. Now, are you doing anything wrong? You tried to append the path on the
  5256. command line.
  5257.  
  5258. Variable substitution does not work at the command line. You need to create
  5259. and use your own XPATH.BAT file as:
  5260.  
  5261.     PATH=%PATH%;%1
  5262.  
  5263. Unfortunately, Command.Com is too brain-dead to understand things
  5264. like %path% on the command line.  You'll need to write a short
  5265. batch file to do what you want under DOS 5, or else upgrade to
  5266. 4DOS or NDOS.
  5267.  
  5268. Try:
  5269.  
  5270. set path=d:\newpath;%PATH%
  5271.  
  5272. Notice that from the command line you must use "set" to change the
  5273. environment.
  5274.  
  5275. I believe this is dependent of which dos version you are running. However, I
  5276. think PATH=%PATH%;%1 should work with any new dos versions.
  5277.  
  5278. Adding to, and deleting from the path, with error checking, is
  5279. explained in 116907 Jan 30 22:59 ftp://garbo.uwasa.fi/pc/ts/tsbat46a.zip
  5280. tsbat46a.zip A collection of useful batch files and tricks.
  5281.  
  5282. Chapter 35: Numlock on
  5283. ======================
  5284.  
  5285. DOS 6.nnn & many CMOS's allow you to set numlock.  This one lets you
  5286. change at command line or in any batch file. Syntax:
  5287.  
  5288.     "numlock +"     turns it on
  5289.     "numlock -"     turns it off
  5290.  
  5291. Excluding start and end lines, copy the following into a file called
  5292. numlock.scr, run it through debug.   "debug < numlock.scr"
  5293.  
  5294. NUMLOCK.SCR
  5295. ===========
  5296. A     0100
  5297. CLD
  5298. MOV   SI,0081
  5299. MOV   AX,0040
  5300. MOV   ES,AX
  5301. LODSB
  5302. CMP   AL,20
  5303. JZ    0109
  5304. CMP   AL,0D
  5305. JZ    0127
  5306. CMP   AL,2B
  5307. JNZ   011D
  5308. ES:
  5309. OR    BYTE PTR [0017],20
  5310. RET
  5311. CMP   AL,2D
  5312. JNZ   0127
  5313. ES:
  5314. AND   BYTE PTR [0017],DF
  5315. RET
  5316.  
  5317. N NUMLOCK.COM
  5318. RCX
  5319. 28
  5320. W
  5321. Q
  5322.  
  5323.  
  5324. Chapter 36: Changing the date during execution
  5325. ==============================================
  5326.  
  5327. HOKUS.BAT
  5328. =========
  5329.  
  5330. @ECHO OFF
  5331. REM This is a program that changes the date during execution
  5332. IF NOT .%3==%3. GOTO DEL2
  5333. IF NOT .%2==%2. GOTO OK
  5334. CLS
  5335. ECHO-------------FAILURE!---------------
  5336. ECHO SYNTAX IS: HOKUS PROGRAM DD-MM-YY
  5337. GOTO END
  5338. :OK 
  5339. SET PROGRAM=%1
  5340. SET TESTDATE=%2
  5341. REM THE NEW FILE HOKUS.JBT HAS CURRENT DATE
  5342. REM AND THE FILENAME WILL BE USED TO START
  5343. REM THIS .BAT-FILE FOR THE SECOND TIME
  5344. DIR > HOKUS.JBT
  5345. REM FIND MUST BE IN PATH
  5346. REM 4 SPACE BETWEEN HOKUS AND JBT
  5347. DIR HOKUS.JBT|FIND "HOKUS    JBT">POKUS.BAT
  5348. POKUS 
  5349. :PART2 DELETE TEMPORARY FILES
  5350. DEL HOKUS.JBT
  5351. DEL POKUS.BAT
  5352. REM %3 WE SAVE IT FOR SYSTEMINFORMATION
  5353. SET DATE=%3
  5354. REM NOW THE TEST DATE
  5355. DATE %TESTDATE%
  5356. %PROGRAM%
  5357. REM THIS IS WHERE YOU RESTORE CURRENT DATE
  5358. DATE %DATE%
  5359. SET DATE=
  5360. SET TESTDATE=
  5361. SET PROGRAM=
  5362. :END
  5363.  
  5364.  
  5365. HOKUS.BAT is a very complicated batch program. It's created
  5366. exclusively for programmers and others that need to manipulate
  5367. the date before they execute a program. If you are making
  5368. a demo with a time limit, you can get help from HOKUS.BAT
  5369. to test the program on different dates. But of course 
  5370. HOKUS.BAT is a program that you also can use in the 
  5371. opposite way - to make the life of a demo longer.
  5372.  
  5373. If you write the following: HOKUS ENLARGE.BAT 02-02-95,
  5374. the program ENLARGE.BAT will act as the date is february the
  5375. second 1995. When HOKUS has finished, the date will be the same 
  5376. as when you started. During the execution HOKUS.BAT has 
  5377. created and deleted POKUS.BAT and HOKUS.JBT. Notice
  5378. that during the process you have done nothing to get
  5379. the current date. You have changed the date during the
  5380. the performance, but you have written only one date.
  5381.  
  5382. ENLARGE.BAT
  5383. ===========
  5384.  
  5385. @ECHO OFF
  5386. SET PATH=%PATH%;%1
  5387.  
  5388. Chapter 37: Undocumented commands
  5389. =================================
  5390. VER with the switch /r produces
  5391.  
  5392. MS-DOS version 6.20
  5393. Revision A
  5394. DOS is in HMA
  5395.  
  5396.  
  5397. Chapter 38: Ctrl-c/break
  5398. ========================
  5399.  
  5400. I'had written a little password protection batch file to prevent
  5401. unauthorized access.  This in itself is pretty useless unless
  5402. the CTRL+C/BREAK is disabled/redefined, at least temporarily until
  5403. access is granted, when they should be reactivated. So I was looking for
  5404. something along the lines of DOS batch (ie,redefinition of keys), or a
  5405. small assembler program using debug to disable and then enable
  5406. CTRL-BREAK.
  5407.  
  5408. The break command will only determine how often/when the system will
  5409. check for the CTRL-BREAK sequence, but will not disable its use.
  5410.  
  5411. BREAK=OFF is the default. DOS always has BREAK turned off unless you
  5412. TURN IT ON first. Besides that, BREAK does not turn break checking
  5413. on and off.  It turns EXTENDED break checking on and off.
  5414. With extended break checking on, DOS checks for break each time a
  5415. DOS call is made.  With extended break checking off, DOS checks
  5416. for break each time it writes anything to the screen or a COM port,
  5417. or reads anything from the keyboard or a COM port.
  5418. Turning extended break checking off does not even come
  5419. close to preventing DOS from checking for break.  It just makes DOS do
  5420. so less often than when extended break checking is on.
  5421. BREAK Sets or clears extended CTRL+C checking n activity (file sorting,
  5422. for example). Typically, MS-DOS checks for CTRL+C only
  5423. to other functions, such as disk read and write operations.
  5424. Syntax BREAK [O ing syntax: BREAK=ON|OFF Parameter ON|OFF
  5425. Turns extended CTRL+C checking
  5426.  
  5427. Well, if you read the online help about the BREAK command, then why do
  5428. you not know that (1) OFF is the default so there's absolutely no
  5429. reason to turn it off unless you'd already turned it on, and (2)
  5430. turning off extended break checking does not in any way keep DOS from
  5431. checking for break.  It turns off EXTENDED break checking.  It does
  5432. not turn off break checking.
  5433.  
  5434.  NOABORT.COM
  5435.  
  5436.  Clip everything between (not including) the CLIP lines.  This message
  5437.  will be broken up into several (it's a long listing) so append each
  5438.  together editing out anything in between so you have one solid listing
  5439.  from clip line to clip line.  Save this to a DOS Text file called
  5440.  NOABORT.ASC, and then from the DOS command line type:
  5441.  
  5442.  DEBUG < NOABORT.ASC
  5443.  
  5444.  The result should be a 5k file called NOABORT.COM. Simply execute it
  5445.  when you want to turn CTRL-C/BREAK/CTRL-ALT-DEL checking on.  It is a
  5446.  TSR that will stay in memory until you unload it.  To unload it, use
  5447.  the /U parameter.  For example:
  5448.  
  5449.  MYBATCH.BAT:
  5450.  ============
  5451.    @ECHO OFF
  5452.    NOABORT
  5453.  
  5454.    ECHO. | DATE > LOGFILE.TXT
  5455.    F:
  5456.    LOGIN
  5457.    C:
  5458.  
  5459.    NOABORT /U
  5460.    :* EOF
  5461.  ------------
  5462.  
  5463.  *WARNING*  IF ANY OTHER TSR PROGRAMS HAVE BEEN LOADED IN BETWEEN AND
  5464.  NOT UNLOADED, AND YOU USE THE /U SWITCH, YOU WILL CRASH THE MACHINE!
  5465.  
  5466.  If you have any questions, please give me a holler.
  5467.  
  5468. NOABORT.SCR
  5469. ===========
  5470. n noabort.com
  5471. e 0100 E9 A4 07 4E 4F 41 42 4F 52 54 20 42 4C 4F 43 4B 20 4D 41 52
  5472. e 0114 4B 45 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5473. e 0128 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5474. e 013C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5475. e 0150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5476. e 0164 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5477. e 0178 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5478. e 018C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5479. e 01A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5480. e 01B4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5481. e 01C8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5482. e 01DC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5483. e 01F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5484. e 0204 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5485. e 0218 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5486. e 022C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5487. e 0240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5488. e 0254 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5489. e 0268 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5490. e 027C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5491. e 0290 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5492. e 02A4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5493. e 02B8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5494. e 02CC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5495. e 02E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5496. e 02F4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5497. e 0308 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5498. e 031C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5499. e 0330 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5500. e 0344 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5501. e 0358 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5502. e 036C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5503. e 0380 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5504. e 0394 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5505. e 03A8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5506. e 03BC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5507. e 03D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5508. e 03E4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5509. e 03F8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5510. e 040C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5511. e 0420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5512. e 0434 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5513. e 0448 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5514. e 045C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5515. e 0470 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5516. e 0484 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5517. e 0498 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5518. e 04AC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5519. e 04C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5520. e 04D4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5521. e 04E8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5522. e 04FC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5523. e 0510 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5524. e 0524 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5525. e 0538 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5526. e 054C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5527. e 0560 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5528. e 0574 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5529. e 0588 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5530. e 059C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5531. e 05B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5532. e 05C4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5533. e 05D8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5534. e 05EC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5535. e 0600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5536. e 0614 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5537. e 0628 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5538. e 063C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5539. e 0650 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5540. e 0664 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5541. e 0678 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5542. e 068C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5543. e 06A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5544. e 06B4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5545. e 06C8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5546. e 06DC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5547. e 06F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5548. e 0704 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5549. e 0718 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5550. e 072C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5551. e 0740 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5552. e 0754 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5553. e 0768 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5554. e 077C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5555. e 0790 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5556. e 07A4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5557. e 07B8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5558. e 07CC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5559. e 07E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5560. e 07F4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5561. e 0808 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5562. e 081C 00 00 00 00 00 40 00 00 00 00 00 9C 50 51 57 56 1E 06 FB 8C
  5563. e 0830 C8 8E D8 2E 8E 06 21 08 BE 17 00 26 8A 24 2E 88 26 20 08 B4
  5564. e 0844 02 CD 16 24 08 3C 08 75 06 E4 60 3C 51 74 30 2E 8A 26 20 08
  5565. e 0858 F6 C4 04 74 3E F6 C4 08 75 0F F6 C4 03 75 34 E4 60 3C 2E 74
  5566. e 086C 16 3C 46 74 12 E4 60 24 7F 3C 53 75 22 B4 02 CD 16 24 0C 3C
  5567. e 0880 0C 75 18 E4 61 8A E0 0C 80 E6 61 8A C4 E6 61 B0 20 E6 20 07
  5568. e 0894 1F 5E 5F 59 58 9D CF 07 1F 5E 5F 59 58 9D 2E FF 2E 23 08 E8
  5569. e 08A8 C9 09 0B C0 74 08 E8 CD 0B 3D 02 00 74 07 0B C0 75 06 EB 07
  5570. e 08BC 90 E8 BC 09 E8 DB 09 0E 07 33 F6 33 C0 8E D8 BF 20 01 B9 00
  5571. e 08D0 02 F3 A5 0E 1F B8 09 35 CD 21 2E 89 1E 23 08 2E 8C 06 25 08
  5572. e 08E4 BA 27 08 B8 09 25 CD 21 BA A7 08 CD 27 4E 4F 41 42 4F 52 54
  5573. e 08F8 20 42 4C 4F 43 4B 20 4D 41 52 4B 45 52 14 4D 65 6D 6F 72 79
  5574. e 090C 20 63 6F 72 72 75 70 74 20 2D 20 50 72 6F 67 72 61 6D 20 61
  5575. e 0920 62 6F 72 74 69 6E 67 20 2E 2E 2E 0D 0A 24 43 61 6E 6E 6F 74
  5576. e 0934 20 66 72 65 65 20 6D 65 6D 6F 72 79 20 2D 20 50 72 6F 67 72
  5577. e 0948 61 6D 20 61 62 6F 72 74 69 6E 67 20 2E 2E 2E 0D 0A 24 24 45
  5578. e 095C 52 52 4F 52 3A 20 24 0D 0A 24 00 00 00 00 00 00 00 00 00 00
  5579. e 0970 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5580. e 0984 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5581. e 0998 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5582. e 09AC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5583. e 09C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5584. e 09D4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5585. e 09E8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5586. e 09FC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5587. e 0A10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5588. e 0A24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5589. e 0A38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5590. e 0A4C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5591. e 0A60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5592. e 0A74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5593. e 0A88 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5594. e 0A9C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5595. e 0AB0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5596. e 0AC4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5597. e 0AD8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5598. e 0AEC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5599. e 0B00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5600. e 0B14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5601. e 0B28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5602. e 0B3C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5603. e 0B50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5604. e 0B64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5605. e 0B78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5606. e 0B8C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5607. e 0BA0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5608. e 0BB4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5609. e 0BC8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5610. e 0BDC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5611. e 0BF0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5612. e 0C04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5613. e 0C18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5614. e 0C2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5615. e 0C40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5616. e 0C54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5617. e 0C68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5618. e 0C7C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5619. e 0C90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5620. e 0CA4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5621. e 0CB8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5622. e 0CCC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5623. e 0CE0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5624. e 0CF4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5625. e 0D08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5626. e 0D1C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5627. e 0D30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5628. e 0D44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5629. e 0D58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5630. e 0D6C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5631. e 0D80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5632. e 0D94 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5633. e 0DA8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5634. e 0DBC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5635. e 0DD0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5636. e 0DE4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5637. e 0DF8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5638. e 0E0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5639. e 0E20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5640. e 0E34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5641. e 0E48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5642. e 0E5C 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
  5643. e 0E70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5644. e 0E84 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5645. e 0E98 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5646. e 0EAC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5647. e 0EC0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5648. e 0ED4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5649. e 0EE8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5650. e 0EFC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5651. e 0F10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5652. e 0F24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5653. e 0F38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5654. e 0F4C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5655. e 0F60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5656. e 0F74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5657. e 0F88 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5658. e 0F9C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5659. e 0FB0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5660. e 0FC4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5661. e 0FD8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5662. e 0FEC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5663. e 1000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5664. e 1014 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5665. e 1028 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5666. e 103C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5667. e 1050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5668. e 1064 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5669. e 1078 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5670. e 108C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5671. e 10A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5672. e 10B4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5673. e 10C8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5674. e 10DC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5675. e 10F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5676. e 1104 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5677. e 1118 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5678. e 112C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5679. e 1140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5680. e 1154 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5681. e 1168 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5682. e 117C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5683. e 1190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5684. e 11A4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5685. e 11B8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5686. e 11CC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5687. e 11E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5688. e 11F4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5689. e 1208 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5690. e 121C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5691. e 1230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5692. e 1244 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5693. e 1258 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5694. e 126C 00 00 00 00 00 00 00 33 C0 E8 2F 00 E8 12 01 C3 33 C0 E8 26
  5695. e 1280 00 E8 09 01 0B C0 75 03 E8 13 00 E8 73 01 E8 51 01 E8 C1 01
  5696. e 1294 2E C6 06 68 0E 00 E8 01 00 C3 B4 4C 2E A0 68 0E CD 21 C3 E8
  5697. e 12A8 7C 00 2E A3 69 0E 2E A3 6C 12 2E C6 06 70 12 00 2E C6 06 71
  5698. e 12BC 12 00 2E C6 06 67 0E 00 33 F6 2E 80 2E 67 0E 05 2E 8E 06 6C
  5699. e 12D0 12 26 A0 00 00 2E A2 72 12 3C 4D 75 1F E8 4F 00 2E 80 3E 70
  5700. e 12E4 12 00 74 0B 2E A1 6E 12 2E A3 6C 12 EB 29 90 2E 83 06 6C 12
  5701. e 12F8 01 EB 20 90 2E 80 3E 70 12 01 75 14 2E 80 3E 72 12 5A 75 0C
  5702. e 130C 2E C6 06 71 12 01 E8 1A 00 EB 0E 90 E8 83 FF 2E 80 3E 71 12
  5703. e 1320 01 74 02 EB A7 C3 B4 52 CD 21 26 8B 47 FE C3 50 53 51 06 2E
  5704. e 1334 8E 06 6C 12 26 A1 03 00 8C C3 03 D8 43 2E 89 1E 6E 12 26 8B
  5705. e 1348 0E 01 00 2E 8E 06 6E 12 26 8A 1E 00 00 2E 80 3E 71 12 00 75
  5706. e 135C 0A 80 FB 5A 74 05 80 FB 4D 75 21 2E 80 06 67 0E 05 33 DB 2E
  5707. e 1370 8A 1E 67 0E 2E C6 06 70 12 01 2E A1 6C 12 2E 89 87 66 09 2E
  5708. e 1384 89 8F 68 09 07 59 5B 58 C3 33 DB 2E 8A 1E 67 0E 2E C6 06 6B
  5709. e 1398 0E 00 8C C8 2E 39 87 68 09 74 10 E8 21 00 0B C0 74 09 2E C6
  5710. e 13AC 06 6B 0E 01 EB 0B 90 83 EB 05 83 FB 00 77 DF 33 DB 2E A0 6B
  5711. e 086C 16 3C 46 74 12 E4 60 24 7F 3C 53 75 22 B4 02 CD 16 24 0C 3C
  5712. e 0880 0C 75 18 E4 61 8A E0 0C 80 E6 61 8A C4 E6 61 B0 20 E6 20 07
  5713. e 0894 1F 5E 5F 59 58 9D CF 07 1F 5E 5F 59 58 9D 2E FF 2E 23 08 E8
  5714. e 08A8 C9 09 0B C0 74 08 E8 CD 0B 3D 02 00 74 07 0B C0 75 06 EB 07
  5715. e 08BC 90 E8 BC 09 E8 DB 09 0E 07 33 F6 33 C0 8E D8 BF 20 01 B9 00
  5716. e 08D0 02 F3 A5 0E 1F B8 09 35 CD 21 2E 89 1E 23 08 2E 8C 06 25 08
  5717. e 08E4 BA 27 08 B8 09 25 CD 21 BA A7 08 CD 27 4E 4F 41 42 4F 52 54
  5718. e 08F8 20 42 4C 4F 43 4B 20 4D 41 52 4B 45 52 14 4D 65 6D 6F 72 79
  5719. e 090C 20 63 6F 72 72 75 70 74 20 2D 20 50 72 6F 67 72 61 6D 20 61
  5720. e 0920 62 6F 72 74 69 6E 67 20 2E 2E 2E 0D 0A 24 43 61 6E 6E 6F 74
  5721. e 0934 20 66 72 65 65 20 6D 65 6D 6F 72 79 20 2D 20 50 72 6F 67 72
  5722. e 0948 61 6D 20 61 62 6F 72 74 69 6E 67 20 2E 2E 2E 0D 0A 24 24 45
  5723. e 095C 52 52 4F 52 3A 20 24 0D 0A 24 00 00 00 00 00 00 00 00 00 00
  5724. e 0970 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5725. e 0984 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5726. e 0998 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5727. e 09AC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5728. e 09C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5729. e 09D4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5730. e 09E8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5731. e 09FC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5732. e 0A10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5733. e 0A24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5734. e 0A38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5735. e 0A4C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5736. e 0A60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5737. e 0A74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5738. e 0A88 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5739. e 0A9C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5740. e 0AB0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5741. e 0AC4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5742. e 0AD8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5743. e 0AEC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5744. e 0B00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5745. e 0B14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5746. e 0B28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5747. e 0B3C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5748. e 0B50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5749. e 0B64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5750. e 0B78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5751. e 0B8C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5752. e 0BA0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5753. e 0BB4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5754. e 0BC8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5755. e 0BDC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5756. e 0BF0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5757. e 0C04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5758. e 0C18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5759. e 0C2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5760. e 0C40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5761. e 0C54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5762. e 0C68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5763. e 0C7C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5764. e 0C90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5765. e 0CA4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5766. e 0CB8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5767. e 0CCC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5768. e 0CE0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5769. e 0CF4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5770. e 0D08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5771. e 0D1C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5772. e 0D30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5773. e 0D44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5774. e 0D58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5775. e 0D6C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5776. e 0D80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5777. e 0D94 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5778. e 0DA8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5779. e 0DBC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5780. e 0DD0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5781. e 0DE4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5782. e 0DF8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5783. e 0E0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5784. e 0E20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5785. e 0E34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5786. e 0E48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5787. e 0E5C 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
  5788. e 0E70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5789. e 0E84 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5790. e 0E98 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5791. e 0EAC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5792. e 0EC0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5793. e 0ED4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5794. e 0EE8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5795. e 0EFC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5796. e 0F10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5797. e 0F24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5798. e 0F38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5799. e 0F4C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5800. e 0F60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5801. e 0F74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5802. e 0F88 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5803. e 0F9C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5804. e 0FB0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5805. e 0FC4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5806. e 0FD8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5807. e 0FEC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5808. e 1000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5809. e 1014 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5810. e 1028 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5811. e 103C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5812. e 1050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5813. e 1064 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5814. e 1078 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5815. e 108C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5816. e 10A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5817. e 10B4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5818. e 10C8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5819. e 10DC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5820. e 10F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5821. e 1104 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5822. e 1118 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5823. e 112C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5824. e 1140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5825. e 1154 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5826. e 1168 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5827. e 117C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5828. e 1190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5829. e 11A4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5830. e 11B8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5831. e 11CC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5832. e 11E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5833. e 11F4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5834. e 1208 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5835. e 121C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5836. e 1230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5837. e 1244 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5838. e 1258 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5839. e 126C 00 00 00 00 00 00 00 33 C0 E8 2F 00 E8 12 01 C3 33 C0 E8 26
  5840. e 1280 00 E8 09 01 0B C0 75 03 E8 13 00 E8 73 01 E8 51 01 E8 C1 01
  5841. e 1294 2E C6 06 68 0E 00 E8 01 00 C3 B4 4C 2E A0 68 0E CD 21 C3 E8
  5842. e 12A8 7C 00 2E A3 69 0E 2E A3 6C 12 2E C6 06 70 12 00 2E C6 06 71
  5843. e 12BC 12 00 2E C6 06 67 0E 00 33 F6 2E 80 2E 67 0E 05 2E 8E 06 6C
  5844. e 12D0 12 26 A0 00 00 2E A2 72 12 3C 4D 75 1F E8 4F 00 2E 80 3E 70
  5845. e 12E4 12 00 74 0B 2E A1 6E 12 2E A3 6C 12 EB 29 90 2E 83 06 6C 12
  5846. e 12F8 01 EB 20 90 2E 80 3E 70 12 01 75 14 2E 80 3E 72 12 5A 75 0C
  5847. e 130C 2E C6 06 71 12 01 E8 1A 00 EB 0E 90 E8 83 FF 2E 80 3E 71 12
  5848. e 1320 01 74 02 EB A7 C3 B4 52 CD 21 26 8B 47 FE C3 50 53 51 06 2E
  5849. e 1334 8E 06 6C 12 26 A1 03 00 8C C3 03 D8 43 2E 89 1E 6E 12 26 8B
  5850. e 1348 0E 01 00 2E 8E 06 6E 12 26 8A 1E 00 00 2E 80 3E 71 12 00 75
  5851. e 135C 0A 80 FB 5A 74 05 80 FB 4D 75 21 2E 80 06 67 0E 05 33 DB 2E
  5852. e 1370 8A 1E 67 0E 2E C6 06 70 12 01 2E A1 6C 12 2E 89 87 66 09 2E
  5853. e 1384 89 8F 68 09 07 59 5B 58 C3 33 DB 2E 8A 1E 67 0E 2E C6 06 6B
  5854. e 1398 0E 00 8C C8 2E 39 87 68 09 74 10 E8 21 00 0B C0 74 09 2E C6
  5855. e 13AC 06 6B 0E 01 EB 0B 90 83 EB 05 83 FB 00 77 DF 33 DB 2E A0 6B
  5856. e 086C 16 3C 46 74 12 E4 60 24 7F 3C 53 75 22 B4 02 CD 16 24 0C 3C
  5857. e 0880 0C 75 18 E4 61 8A E0 0C 80 E6 61 8A C4 E6 61 B0 20 E6 20 07
  5858. e 0894 1F 5E 5F 59 58 9D CF 07 1F 5E 5F 59 58 9D 2E FF 2E 23 08 E8
  5859. e 08A8 C9 09 0B C0 74 08 E8 CD 0B 3D 02 00 74 07 0B C0 75 06 EB 07
  5860. e 08BC 90 E8 BC 09 E8 DB 09 0E 07 33 F6 33 C0 8E D8 BF 20 01 B9 00
  5861. e 08D0 02 F3 A5 0E 1F B8 09 35 CD 21 2E 89 1E 23 08 2E 8C 06 25 08
  5862. e 08E4 BA 27 08 B8 09 25 CD 21 BA A7 08 CD 27 4E 4F 41 42 4F 52 54
  5863. e 08F8 20 42 4C 4F 43 4B 20 4D 41 52 4B 45 52 14 4D 65 6D 6F 72 79
  5864. e 090C 20 63 6F 72 72 75 70 74 20 2D 20 50 72 6F 67 72 61 6D 20 61
  5865. e 0920 62 6F 72 74 69 6E 67 20 2E 2E 2E 0D 0A 24 43 61 6E 6E 6F 74
  5866. e 0934 20 66 72 65 65 20 6D 65 6D 6F 72 79 20 2D 20 50 72 6F 67 72
  5867. e 0948 61 6D 20 61 62 6F 72 74 69 6E 67 20 2E 2E 2E 0D 0A 24 24 45
  5868. e 095C 52 52 4F 52 3A 20 24 0D 0A 24 00 00 00 00 00 00 00 00 00 00
  5869. e 0970 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5870. e 0984 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5871. e 0998 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5872. e 09AC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5873. e 09C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5874. e 09D4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5875. e 09E8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5876. e 09FC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5877. e 0A10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5878. e 0A24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5879. e 0A38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5880. e 0A4C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5881. e 0A60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5882. e 0A74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5883. e 0A88 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5884. e 0A9C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5885. e 0AB0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5886. e 0AC4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5887. e 0AD8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5888. e 0AEC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5889. e 0B00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5890. e 0B14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5891. e 0B28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5892. e 0B3C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5893. e 0B50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5894. e 0B64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5895. e 0B78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5896. e 0B8C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5897. e 0BA0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5898. e 0BB4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5899. e 0BC8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5900. e 0BDC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5901. e 0BF0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5902. e 0C04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5903. e 0C18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5904. e 0C2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5905. e 0C40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5906. e 0C54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5907. e 0C68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5908. e 0C7C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5909. e 0C90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5910. e 0CA4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5911. e 0CB8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5912. e 0CCC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5913. e 0CE0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5914. e 0CF4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5915. e 0D08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5916. e 0D1C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5917. e 0D30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5918. e 0D44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5919. e 0D58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5920. e 0D6C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5921. e 0D80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5922. e 0D94 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5923. e 0DA8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5924. e 0DBC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5925. e 0DD0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5926. e 0DE4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5927. e 0DF8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5928. e 0E0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5929. e 0E20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5930. e 0E34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5931. e 0E48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5932. e 0E5C 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
  5933. e 0E70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5934. e 0E84 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5935. e 0E98 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5936. e 0EAC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5937. e 0EC0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5938. e 0ED4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5939. e 0EE8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5940. e 0EFC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5941. e 0F10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5942. e 0F24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5943. e 0F38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5944. e 0F4C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5945. e 0F60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5946. e 0F74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5947. e 0F88 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5948. e 0F9C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5949. e 0FB0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5950. e 0FC4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5951. e 0FD8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5952. e 0FEC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5953. e 1000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5954. e 1014 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5955. e 1028 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5956. e 103C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5957. e 1050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5958. e 1064 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5959. e 1078 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5960. e 108C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5961. e 10A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5962. e 10B4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5963. e 10C8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5964. e 10DC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5965. e 10F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5966. e 1104 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5967. e 1118 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5968. e 112C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5969. e 1140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5970. e 1154 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5971. e 1168 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5972. e 117C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5973. e 1190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5974. e 11A4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5975. e 11B8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5976. e 11CC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5977. e 11E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5978. e 11F4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5979. e 1208 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5980. e 121C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5981. e 1230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5982. e 1244 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5983. e 1258 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  5984. e 126C 00 00 00 00 00 00 00 33 C0 E8 2F 00 E8 12 01 C3 33 C0 E8 26
  5985. e 1280 00 E8 09 01 0B C0 75 03 E8 13 00 E8 73 01 E8 51 01 E8 C1 01
  5986. e 1294 2E C6 06 68 0E 00 E8 01 00 C3 B4 4C 2E A0 68 0E CD 21 C3 E8
  5987. e 12A8 7C 00 2E A3 69 0E 2E A3 6C 12 2E C6 06 70 12 00 2E C6 06 71
  5988. e 12BC 12 00 2E C6 06 67 0E 00 33 F6 2E 80 2E 67 0E 05 2E 8E 06 6C
  5989. e 12D0 12 26 A0 00 00 2E A2 72 12 3C 4D 75 1F E8 4F 00 2E 80 3E 70
  5990. e 12E4 12 00 74 0B 2E A1 6E 12 2E A3 6C 12 EB 29 90 2E 83 06 6C 12
  5991. e 12F8 01 EB 20 90 2E 80 3E 70 12 01 75 14 2E 80 3E 72 12 5A 75 0C
  5992. e 130C 2E C6 06 71 12 01 E8 1A 00 EB 0E 90 E8 83 FF 2E 80 3E 71 12
  5993. e 1320 01 74 02 EB A7 C3 B4 52 CD 21 26 8B 47 FE C3 50 53 51 06 2E
  5994. e 1334 8E 06 6C 12 26 A1 03 00 8C C3 03 D8 43 2E 89 1E 6E 12 26 8B
  5995. e 1348 0E 01 00 2E 8E 06 6E 12 26 8A 1E 00 00 2E 80 3E 71 12 00 75
  5996. e 135C 0A 80 FB 5A 74 05 80 FB 4D 75 21 2E 80 06 67 0E 05 33 DB 2E
  5997. e 1370 8A 1E 67 0E 2E C6 06 70 12 01 2E A1
  5998. e 13C0 0E 2E 88 1E 66 0E C3 33 C0 33 C9 FC 2E 8A 0E 05 09 2E 8E 87
  5999. e 13D4 68 09 BE F1 08 BF 03 01 F3 A6 75 01 40 C3 FA 33 DB 2E 8A 1E
  6000. e 13E8 66 0E 1E B9 00 02 2E 8E 9F 68 09 BE 20 01 33 C0 8E C0 33 FF
  6001. e 13FC F3 A5 1F FB C3 33 DB 2E 8B 0E 6D 09 2E 8A 1E 66 0E 2E 8B 97
  6002. e 1410 68 09 BB FB FF 83 C3 05 2E 3A 1E 67 0E 73 35 2E 3A 1E 66 0E
  6003. e 1424 77 18 8C C8 2E 3B 87 68 09 74 E6 2E 39 97 68 09 72 DF 2E C6
  6004. e 1438 87 6A 09 01 EB D7 2E 39 8F 68 09 74 D0 8C C8 2E 39 87 68 09
  6005. e 144C 74 C7 2E C6 87 6A 09 01 C3 BB FB FF 83 C3 05 2E 3A 1E 67 0E
  6006. e 1460 73 1B 2E 80 BF 6A 09 00 74 EE 2E 8B 87 66 09 40 06 8E C0 B4
  6007. e 1474 49 CD 21 07 73 DE E8 21 FE C3 50 BB 80 00 33 C9 8A 0F 80 F9
  6008. e 1488 00 74 26 83 C3 02 B0 2F B4 2D 3A 07 74 0A 3A 27 74 06 43 E2
  6009. e 149C F5 EB 12 90 43 80 3F 55 74 08 80 3F 75 74 03 EB 04 90 58 40
  6010. e 14B0 50 58 C3
  6011. rcx
  6012. 13B3
  6013. w
  6014. q
  6015.  
  6016. If you got any problems in compiling this script, please
  6017. register your copy of this book and I will send you a diskette
  6018. with all the files mentioned in this book. Internet: finnr@oslonett.no.
  6019.  
  6020.  
  6021. Chapter 39: Can't delete directory
  6022. ==================================
  6023.  
  6024. Oh, joy! A challenging opportunity!  The following is a brute
  6025. force method for dealing with those oddball directories that
  6026. sometimes show up with non-printing characters. Here we go:
  6027.  
  6028. (A)  Make an example to play with. I promise that if you can
  6029. make one, you will be able to get rid of it, too.
  6030. /////           instructions follow
  6031. /////           if you can't do A-1, forget the whole thing
  6032. A-1.  go into BASIC, any flavor.
  6033. /////           program to make a new dir in c:\
  6034. A-2.  10 SHELL "MD C:\AAA"+CHR$(255)+"BBB"
  6035.       20 END
  6036. /////           execute the program
  6037. A-3.  RUN
  6038. A-4.  get out of basic.  sometimes command is SYSTEM or whatever.
  6039. /////           look at the results
  6040. A-5.  DIR *. C:\ /W
  6041. /////           notice the new directory AAA BBB?
  6042.  
  6043. (B)  Now, pretend that you don't know anything about this directory
  6044. with the space in the middle.  We will take it from the edge and
  6045. present a generalized method for getting rid of it, or looking
  6046. into it, etc.
  6047.  
  6048. /////            Put the offending directory listing into a sorted
  6049. /////            text file by name of TEMP
  6050. B-1.  DIR C:\*.|SORT>C:\TEMP
  6051. /////            Look at it and notice AAA BBB is near the top.
  6052. B-2.  TYPE C:\TEMP|MORE
  6053. /////            Find what the middle character of AAA BBB really
  6054. /////            is.  You could use any hex lister, but DEBUG
  6055. /////            is more generalized.
  6056. B-3.  DEBUG C:\TEMP
  6057. /////            Look on the right of the screen for AAA.BBB
  6058. B-4.  D <enter>
  6059. /////            Keep hitting D enter until you see the directory.
  6060. /////            Look at the hex display for 41 41 41 xx 42 42 42
  6061. /////            (which is hex for AAA x BBB)
  6062. /////            and write down the hex number where the xx is.
  6063. /////            Get out of DEBUG
  6064. B-5.  Q <enter>
  6065. /////           Go into BASIC.  Enter the following program.  BE
  6066. /////           SURE to replace the "xx" below with the hex char.
  6067. /////           you wrote down in step B-4.
  6068. /////           This Renames the Directory "AAAxBBB" to "BADBOY"
  6069. /////           by copying the files and deleting AAAxBBB.
  6070. B-6.  10 F$="AAA"+CHR$(&Hxx)+"BBB"
  6071.       20 SHELL "MD C:\BADBOY"
  6072.       30 SHELL "COPY C:\"+F$+\*.* C:\BADBOY"
  6073.       40 SHELL "ECHO Y|DEL C:\"+F$+"\*.*"
  6074.       50 SHELL "RD C:\"+F$
  6075.       60 END
  6076.       RUN
  6077. /////           Now we get to see what's in directory BADBOY, or
  6078. /////           delete the files and the directory, or whatever.
  6079. /////           To conclude this example, kill it.
  6080. B-7.  Get out of basic, back to dos.
  6081. B-8.  RD C:\BADBOY
  6082.  
  6083. Have fun with it.
  6084.  
  6085. Chapter 40: Batch file for cd-rom
  6086. =================================
  6087.  
  6088. Here is the batch file I use to view the contents of the ASP CD-ROM.
  6089. I use List, rather than the index program on the CD.  What I do is
  6090. start another instance of command.com with the /F (fail) switch
  6091. to test for a mounted CD-ROM Disk.  Doing so protects the user from
  6092. confusing DOS error messages and allows the display of a meaningful
  6093. message.  I don't know if MS-DOS 5 supports the /F switch.  If not,
  6094. you might consider upgrading DOS, which would also allow Smartdrive
  6095. to cache the CD.
  6096.  
  6097. I arrived at this technique while working on my AA, BB, CC, etc. batch
  6098. files.  In so doing, I found that testing for nul does not work when
  6099. checking for the presence of a CD-ROM, and that you must look for *.*
  6100. or a more specific filespecification as I did here.
  6101.  
  6102. I run ASP.BAT from the DOS command line, or from Windows (using a PIF).
  6103. I like using MPAUSE instead PAUSE when running under Windows.  MPAUSE
  6104. is a PAUSE clone that includes a mouse click as an keypress. I've
  6105. included the debug script for MPAUSE.COM in case anyone wants it.
  6106.  
  6107. ASP.BAT
  6108. =======
  6109.  
  6110. @echo off
  6111. :: ASP.BAT/MS-DOS 6.2
  6112.  set|find "windir=">nul
  6113.  if not errorlevel 1 cls
  6114.  echo.
  6115.  echo  Checking for ASP CD-ROM....
  6116.  rem>c:\$tstdrv$.$$$
  6117.  %COMSPEC% nul /f /c IF EXIST f:\bbsvend\*.* DEL c:\$tstdrv$.$$$
  6118.  IF NOT EXIST c:\$tstdrv$.$$$ GOTO start
  6119.  DEL c:\$tstdrv$.$$$
  6120.  GOTO err_msg
  6121. :start
  6122.  c:\utl\list f:\bbsvend
  6123.  goto end
  6124. :err_msg
  6125.  echo.
  6126.  echo  ASP programs not found. Please make sure that
  6127.  echo  the ASP CD-ROM is in the drive and try again.
  6128.  set|find "windir=">nul
  6129.  if errorlevel 1 goto end
  6130.  echo.
  6131.  echo  Press any key or click mouse to [Exit]
  6132.  mpause
  6133. :end
  6134.  
  6135. MPAUSE.COM
  6136. ==========
  6137.  
  6138. N MPAUSE.COM
  6139. E 0100 B8 00 00 CD 33 3D 00 00
  6140. E 0108 74 23 B8 01 00 CD 33 B8
  6141. E 0110 03 00 CD 33 81 E3 07 00
  6142. E 0118 75 0A B4 01 CD 16 74 EF
  6143. E 0120 B4 00 CD 16 B8 02 00 CD
  6144. E 0128 33 B4 4C CD 21 B4 01 CD
  6145. E 0130 16 74 FA B4 00 CD 16 B4
  6146. E 0138 4C CD 21 46 8A C2 24 FE
  6147. RCX
  6148. 0040
  6149. W
  6150. Q
  6151.  
  6152. Chapter 41: Get the beep out of CHOICE
  6153. ======================================
  6154.  
  6155. The MS-DOS 6.x CHOICE command is nice except for the BEEP.
  6156. Is there a way to disable the beep Choice makes when you hit <enter>?
  6157. There's a program I invoke via Choice, and I have to hit <enter> to
  6158. go back to Choice's menu.  But then when it goes back to the menu I
  6159. get a beep.
  6160.  
  6161.     Below is a screen cut from a complete DEBUG session, along with
  6162.     brief comments on the right, where I replaced the "07" (bell
  6163.     character) in CHOICE.COM with a "1B" (the <Esc> character).
  6164.  
  6165.     The actual memory addresses will more than likely be different on
  6166.     your system (depends on everything else you have loaded in memory)
  6167.     but, the difference doesn't matter, just follow the concept.
  6168.  
  6169.     The file size of your CHOICE.COM may also be different.
  6170.  
  6171.     Everything I type after loading CHOICE.COM into DEBUG (the first
  6172.     line) will be at a DEBUG "-" (hyphen) prompt.  Everything that
  6173.     does not begin with a "-", is a DEBUG response.
  6174.  
  6175.     +---------------------+
  6176.     | DEBUG CHOICE.COM    | Load CHOICE.COM into DEBUG
  6177.     | -RCX                | Get the size
  6178.     | CX 06DA             | Size is 06DA hex (1754 bytes)
  6179.     | :                   | (Ignore this prompt, just hit [Enter])
  6180.     | -H 06DA 100         | Add 100 to 06DA
  6181.     | 07DA  05DA          | The 07DA on the left is the answer
  6182.     | -S 100 07DA B2 07   | Search from 100 to 07DA for sequence "B2 07"
  6183.     | 104B:077B           | Bingo!  DEBUG found it at address 104B:077B
  6184.     | -E 104B:077B B2 1B  | Edit address 104B:077B to read "B2 1B"
  6185.     | -W                  | Write the change to disk
  6186.     | Writing 006DA bytes | (Debug writes it to disk)
  6187.     | -Q                  | Quit to DOS
  6188.     +---------------------+
  6189.  
  6190.     If the "S"earch command returns more than one address you may either
  6191.     have a different CHOICE.COM than I do or, you may have typed
  6192.     something wrong.  In either case, just type "Q" to quit to DOS.
  6193.  
  6194.     I'd use a renamed copy of CHOICE.COM.  Maybe QCHOICE.COM (Q=Quiet)?
  6195.  
  6196.     BTW, if you're interested, the "B2 07" is hex for instruction:
  6197.  
  6198.       MOV DL,07
  6199.  
  6200.     meaning put "07" (the bell character) into register "DL".  The next
  6201.     instruction would probably be:
  6202.  
  6203.       MOV AH,02
  6204.  
  6205.     the DOS "display output" function.  And finally a:
  6206.  
  6207.       INT 21
  6208.  
  6209.     would kick DOS into action.  When I changed the "07" to "1B" I
  6210.     actually changed the first instruction to read:
  6211.  
  6212.       MOV DL,1B
  6213.  
  6214.     Good luck and enjoy!
  6215.  
  6216. Chapter 42: How to tell MS DOS not to display any messages?
  6217. ===========================================================
  6218.  
  6219. How to tell DOS not to display any messages like, "1 file(s)
  6220. copied" or "bad command or file name"?  I've got a batch file
  6221. that runs as part of a menu and everything works great, BUT...
  6222. ...the effects of my batch running in the background become known when
  6223. "1 file(s) copied" pops through the menu for a second.  Echo off tells
  6224. the computer not to show what YOU are saying, BUT how do you tell the
  6225. computer to soto vocce?
  6226.  
  6227.         i.e.    DIR >NUL
  6228. For the copy command you can redirect the output to the NUL device.
  6229. E.g., copy filename1 filename2 > nul.
  6230.  
  6231. If you redirect the command output to device NUL you'll kill all
  6232. "normal" output. Sadly this doesn't kill "critical" messages. so the
  6233. "File not found" on a delete of a missing file is deemed a critical
  6234. error and cannot be stopped by this simple trick.
  6235.  
  6236.         COPY {here} {there} > NUL
  6237.  
  6238. will run silently.
  6239.  
  6240. Add >nul to the end of the lines that load the commands you want to do
  6241. quietly.
  6242.  
  6243. example
  6244. copy c:\user\*.doc c:\bak\*.doc >nul
  6245.  
  6246. If you need to hide STDERR text, you'll need to direct all CON I/O to
  6247. NUL via the CTTY command:
  6248.  
  6249.        ctty NUL
  6250.        rem All console I/O directed to NUL; no keybd control!
  6251.        echo You'll never see this!
  6252.        copy foo.bar fubar.txt
  6253.        ctty CON
  6254.        echo Console I/O restored.
  6255. '
  6256.  
  6257.  
  6258. I just reminding you about that seldom-used command CTTY.
  6259. I once had done something like this, but if not reused- forgotten!
  6260.  
  6261. Chapter 43: How to dump binary files to readable ASCII text?
  6262. =============================================================
  6263.  
  6264. Here's a little util to dump binary files to readable ASCII text:
  6265.  
  6266.  
  6267. ----------------------------->CUT HERE<-----------------------------
  6268.  NSNOOPER.ZIP
  6269.  E100 FC BB 03 00 BF D4 01 BE CC 01 33 C9 AD 86 CC AA FE C0 E2 FB 4B
  6270.  E115 75 F5 B9 FF FD BA 20 02 52 B4 3F CD 21 5F 72 60 8B F7 50 8B C8
  6271.  E12A B0 2A F2 AE 75 55 B0 0D F2 AE 87 F7 BB 00 01 B2 04 AC 3C 2A 72
  6272.  E13F 62 74 46 57 BF D2 01 B9 40 00 8A E1 F2 AE 5F 75 35 FE C1 2A E1
  6273.  E154 88 27 43 FE CA 75 E0 56 BE 00 01 AD 86 C4 8B D0 AD 86 C4 5E B1
  6274.  E169 02 D2 E0 D3 E0 D2 E2 D3 EA D0 E1 D1 EA D1 D8 E2 FA 86 C2 AA 8A
  6275.  E17E C4 AA 8A C2 AA EB B1 BF 20 02 58 33 D2 F7 D8 13 D2 F7 DA 33 DB
  6276.  E193 8B CA 8B D0 B8 01 42 CD 21 8B 0E CA 01 CC AC 3C 0A 75 FB AC 57
  6277.  E1A8 BF D2 01 B9 40 00 8A E1 F2 AE 5F 75 D0 FE C1 2A E1 86 E0 32 E4
  6278.  E1BD 8B 1E CA 01 03 D8 89 1E CA 01 E9 6C FF 00 00 30 0A 41 1A 61 1A
  6279.  E1D2 2B 2D
  6280.  G=100
  6281.  W220
  6282.  Q GXDPlus 1.0
  6283. *XXBUG20--00001955--26011989--F3EA321C------------------SNOOPER.ZIP
  6284. nI2g1--E++U+6+7hPCV9V4qgerFU++86c+++9++++IotDHp-3IWt3K2LhCbpwIpKKBywf
  6285. n6SYLI6fEKZ8U3GlIcIt-Kkd0TFr4aF7+IsBC2PIU1fFgyZv8XWJB7ksoiPGWAwC6sn6U
  6286. nWhd3TglM7HWz8PLJl6x3OTrUMru1GVJTT8mW80YotCutvmJhMBnxvNzvqxrLBfbbrbDD
  6287. nDJzrb5DjuwxKD6r46ECmcXF2m+P4UzFbAjkNo71JyN+-zTznjzRtBMIdwaIB4XdjD785
  6288. nWlW2QqSUxdBv5YRPVKr6ZvgJyMfqcN0k5Nl1iQbkSfYTsF+yTcUo3vHAanh5bZ0+vqEw
  6289. nZyP74Nsn5lB+wwEQAYQPrysTK9KcM0sjTyEtscaQw8LtoG21Sbz+qqjm1UnuQhjFpdC3
  6290. nLy9mttYKUdU4sq52y0UE8VKQoxXmjMlnwdysxvyi9DrOCQ29+oUmSe2LmKa5IIPdpsp4
  6291. nT3ZZkrY4z13vodTv1D1uDBex1FISPyziz2bpYPmJvrxlePoTTn3Ir3rI9UkO1dza1tI8
  6292. nVSyRvoUXKFzkGVifm3kbCX9FZzI2weIxWIXKQNuIh07GgVby5Y58rt3BaQoKhSQC4dEa
  6293. n-9AyscivwPZ1Bu-hIMPnT612osAntuFiYwm57e-hfxu+36nkqQuTyYLaGBuVBCXuAEdj
  6294. nEPY-x8AXSPtQ0JHeEU3C+nM0w2gIs1KU0E+r0UUOs+5UJmW+wfSyrLvmpPgAFz6axE87
  6295. nz1Sm7+Hhr++5nMpuYsRaYxsIcCaVnJte96HSuSpQw-Q4CbcDtE6bReH92GM-3gGOHV0u
  6296. n2typMtTURLDAdhG++RY0jnLMZ3A4VkCuq2r4cD+NXxGGk1g44t2s7GDHsP-omnlUeYll
  6297. nhmrkfhszCDO8zVLacupNbz4-DXf88CQ2VqDDORvG9Mqp8NCEUovw27NdV4JITJI3k+Q-
  6298. nfDZt9v1YDPjOLVoGbo6c71t7DtuqxMP2TPHJUJ1l-Jn1yGj-PXPZs9ICbzptbvXLSsb6
  6299. naTA6YRApSdS-rXKIz1WjyrbIb0sPKxlvPPqB+VPrygGbWShdtFrKUERl0BXKKNX6q7HD
  6300. nYQB-L-kAoute7GzByvediBxbTwcbDabdYRbkWw119gf6HcH0fEXLvDEPKgJb9sXDSiFP
  6301. nDCtbnJ68T077UAydwUljH4WO2Zms5rb8EN3G-b5h6uuCkAqkpeFAvyh0avXTdZFaCMcj
  6302. ne1Ag3yEAjzVg7w959qltYIaF7eeXUMfJCEMyrModrhXGHIN+O3qsLzG8CkpSymvY3HjU
  6303. nSlz0xZpMr3ZeTqcH4ru6m8NGwQY4BbkjkQ0qy7H2VeSFOiLy5AT84jmtda8EAX+TiBUl
  6304. n3bzi9HwBj7Z6mKZSaKI--EX8TCHEoA+tCAi3dYljv0sLqpKBT0IJXDwFYLZWitcOCSKB
  6305. nHKbwAWFIA6HUs7vTcU+V8eftSEy1u3nJX5Ava9s-wjgnzCsCVeFpA8-gZKHhMYXKoz1r
  6306. n1+BQ82x5MGYx1VIx8jm88xeOykULPMT6oyJ-gnwfq9RUulhPDjcB9j2XPt0-wC2dTlml
  6307. nnh5hkZO2MrxebhoBIQPZyOPNStM-ev4xv4jtAM8XVMDCSz2LKvjPXqwxqhuxRD5tNqNr
  6308. nRvHzTQirKovULbloYH6-BFeR0tEleD3WaJImZOJ8LBYcKNbRfLs4fadQq45iZUq9Bbwm
  6309. nizjWk9VxWqRAZh8tmKLrm2NDqKGNqPTMQe2rj1TeMBy4LTI6twhx-0pWzsOzkqQ9JSQN
  6310. nz9ajO1AOGDCtYDQBdaGTiTiHGx8tsauTW6d6kOws183keJ7d+-y2lOPatVfP6QsKLsWS
  6311. nTqMG5VF6GHhGdViwfnDsi53D8k93gS4PcwLRVkXlnTTqAhzidq5pCtxFqmzZ5MlJrrrX
  6312. ngAXdOjRhCQAHcECqcsdoKpNXBsRj2zNA2od1gWYYH-AEIXCk1-Ca0Pt4PXRwJUUfOt8k
  6313. nFK2uXrz2Fe0lkATtadXR-LGms0gd23EHXf3ikGQnCAVnG2K7aQ-0QLwy6Gqb2JdaIvu1
  6314. nHMLDSKB2tc0LOs00fs6-52cEm+0gnTvVmESja1nCJr8xhfMyDPti2gAK5Kw31j2KZ1x6
  6315. nw80rz5c-mQNeNHRle+hlmHE--o5Xgn05XrZvddLqC2RJqtJI+f3W8iN8Ewsoix6LQt+s
  6316. nwEkg0OIkGLujKdYA3-70IXJzoD6ZAdHqB-Xrv2Gke0IYz-ONx2okX4ALK42bwjMXz4P9
  6317. nOwU+1IizP0vxhkNV0zHzslmu6zt6poZEq+38y1D-bwRvj4Q32BFZ8WMVwF8BEp42w0bF
  6318. nPqkJGNZHBVwqo1tkV-gwPh6cdlxaK21oo2s4eFCVQlLh57LI0EYhz4jYts000CC3oaVD
  6319. nKO3Q02q7VX3mbnm7RgiwVc71yJ4GmW2wG2YMU+G988cgh9m53eXtqUE9h1ohJR23GArQ
  6320. nbQLbcqs9VBcLY2TWhRuEw1GHbc3f-Bxw93u0QCsnMX38ZEjVeIR+ae+Q--wHu8BBXBfO
  6321. nl7VB6H3k59-RXeS7Etia23SAi86oKdL+FV3O8nVnxuPIM+J5EVIAcVOdx3RkHxWI-VuG
  6322. n2unwIkMl+QHM6X1AGAB715vhmVcS6XpUKSl8YS0UpZF5VGdGE9Z-Q10R8rjLTZNZJ2GL
  6323. nPn9Xc1SMASwfnjaJ-UgkFp+t1JpnFyIxUgxFLtDdI7eOMhQmWu1YYF3bRtZkFJddI87C
  6324. nCxeijAEv2ZV1gK2gGAKcmO6o7yVFt13yYEC7vQ+wlHsmX6qfiAsmQ9gXSIt43Kn8nNT+
  6325. nQrcseZ9EQy3PVTqR0svYoHsacKPMC26YV9dZIw7K+-YUs9GVrRTkSO67WuMLD+PNG7CW
  6326. ncZnIpiGIap6Q1dwMdIZrP2EoSN+a-Eh6o8ha+UpCGUbMMAf93wATUOvJwYXc576akKEU
  6327. ncGmBmvC7lw5k8wWirAQvJ8iOdGYUeglC5jsxIXRgotmxaWvRfYI3ChfYoAr5IZtW9k+H
  6328. nSS-vJZXQ6o2gXCIHZ4e3v+uQqtJPKT+HpEm1XAHN3HLaRISFB3vXOfFK-A+TdSyk+09Y
  6329. njKg-ZEJDEFbIIz0lZhBYoB81Hx5cydJauy42OXxUk3J0t1IcHgo5aAVf578N+t0LiHyR
  6330. napkZa3zfb+QK4ExAWo6y4Il3bWEeM8P5-lA4V1E43ebVw-kQ-74U3OZY3c-m+L2GvKwq
  6331. nelPwQOJbjZZa0G+2ew+bjU7N2zi5WNRp648NFLBx4ZxyubKP1L84hkmtkQZzFrNA3sI7
  6332. nRZD9+wn8K6U1FuwkyGfAl+KzgCg2TSgMH9+hO4pZdaPKu4U77Q2edmzncNYiMreJ26cl
  6333. nbucFn49HOTnJ01FwxVVs-Jpw+fP5M9Aj+rhYY-rsC5vvfVK3jRZxee+DuBihpptxC-DF
  6334. n1HQKJn1tW7q5K7ar8vwkCq1PsR+GYDbAmdd2XO7jOJNtYl-7o0K7fzsV-uPoQNNihkJ2
  6335. nzNU+xpDI54-2HeC2aqDU5V-KM9S11W-2N0FJAL5W-0EIY0DNE9ErdGaBJ7XlDKNz7SZ2
  6336. nsEwEsNeAk2W4EP6Y06Kv82oDwXM7G-dfJtMEo7B+-tt3uZz1IA0JHyGFD1SkbmoBmfBo
  6337. nZbiFJYk1iyHmTlOj1W7Eefcb6TTF4BJtaoXWIjy-GXrDU8E05EuO5-EmObmd8QaGIr2b
  6338. nEBFCZGbns4Xzeib79s7EQJg+RnO3cpa7mhxNsFQ3ucVJNakrUJSbSBqEMXbQctec8sSy
  6339. nXySe+8c+h0Bt+MGQLBzdjeB7VMUNB8W3DVZaatVacMKENdSaaEtEGUsc7HrEFNI0VIcC
  6340. n1u7bued8pJIZV6G7o+hqZB6HvUNKiUlO+GYs27J67iKTFXh+aDCE2+EOmLYS-8OyENSI
  6341. ntZi6enEYv488AXE-feZK1YMUWUWoyUB3ETPL51sPhWnAcHCPs8FYAgUoZNVcUY2XlN89
  6342. nCklJg-vAQIVRfJbQ0jlhGfIf9ljdze1xJIbQjNzVo385FPRF0M7WI2hR4fjI5qYmwnOZ
  6343. nUCjEa0iZ89hsan7FQCWN8NFIQaZZCiyBNHOB0UUEQVRydsua2GM22MOE8zmL6bSKspDI
  6344. nQUY2aflgGidr4UtgjLHI3KDJR40KFF7gisa2PfgZwZSktK0MorNalj1kVs7X0Ml1xLIq
  6345. njWSfkrq6u4tG8NG8Uci578BeQ9Ak5BBecSJh-YLRAsnMg7HqnITmMZ6Z3-CEEVhV-zLj
  6346. nuQYoDsBYMB6DUu0ztqUJUAwNL8PGW1E8Vke1-Z3Evp+Lko2YW4hAfIMWac+cpWkwMsYo
  6347. n5OOGx8Mlx8jGX3Te4laTIoTF5406OWa4lfpiKbx0W8-i+aSd+XVK0NfiFocJQ+-643de
  6348. nfg5-sbtMfzWhBCIM4kxwZkmBSIu6EUrNSbe1C8hw39B-j3hFq3DQ5vaULeTaMvSdIaIB
  6349. n9as7DNR8OM-edsUjlU-G6+gLVd6mXfugO3ckXo5CJ-0WPm+0leGV+Weurm+xXZBFqV0B
  6350. nUK6IJfgOqEDV2a9iuaqs8UcWt-dl17y8vWiP8Aq2+l5TQTcvBSToCK3t6flEQiKIrBr4
  6351. n86G6Xh6VIAnjJCjm+6BgYFDNrPOZ3CIhg6J7KuLZIQfGrK0CrWHSCyRf+QGIJ8VgymMS
  6352. n5ZfCyh4kM+pIZUgcaS2l6s6BI2v0lzHVZiT+YmzHnPet0GlYwarSGBdSQFBpDKbTGD1C
  6353. n7Y7U+0fZnEyHAfDA-PZIoEzhJYtgqykay8D0cmpE31SJOp0gQ90OBXG75xMIiBZ3GYBG
  6354. nhfT9FM+j4VdGeIpU4FO4k1N9u59Sfcq2ScaD7CVEMve8FeXBH86qDcbO88+KdwF1AoZR
  6355. n6y8Pd+meOFfi88ZJ05zSiG-NZyaq2PJbr2IJCyRQ6iv40vS5aS2n3REICF3FU6gp6F6o
  6356. n6ApzhHA7boW1kwjfuipQu-TBJxfCO3Ayy5f5wDZYgfpOUDUCbZFXwUtBPPn9AwEsZqAl
  6357. n-JSZKRvO-3QOg6YgELtaNSF2t9Xr-4dnbFd6TumkDr9ygQXtpYllM7Hu1MKU0KbkyvOe
  6358. nIt2Hv9jF8Xwrkxn+QPSc90Bm5OSzDc+usBFUHZEx8RdKR7jAAXoRve+eV7DYAdja8eM1
  6359. n-hi-JHPZbd3nZe-hFD+Ywk4YXGrscH2cagkXxpoIPM84Nhzyy8yv7GMmw-VwQN2nv7jP
  6360. n6kBgLwovwFgpW+JgJt2Et3+UZsTAh+Yepc+NqG+7kRpPb1J37f-B+dAdkXqod+peVEQr
  6361. nL9xtmqQ6hCm0Ilehekr0145r111d1eWBhH7UKgnVc-5eErqehfJiVO6H1ADdATrafsOn
  6362. nPVECm40KMvDd9Q8ryxhY+X3NOoPu0WxiWJ+DY7Vb3jS3nnzPM5U4wjZ6TggpohblaTWp
  6363. nmB2T7kpiVThKi7i+Kgshs2UQ8R65cQH3bRzffm1yblBxyygQ9e63-5IUmWTva3PzzXhZ
  6364. nwxJdjAeyCdAzl8BhwOj9ExT-nSJgbVtOkbBJDSkZlne-qaPNhYGhsPnpEcw5uWb1ki8r
  6365. nWjg-bfLA3a1W+6F+0AQf5AuQ+3c6MyB8vH3bGWBT8YORacrBigtsM0NFpZQb0VKxWZsB
  6366. n4Ppd7WEy2t8VX19XXvkxT4aDb8KLoABkj+U3SXTV7c2hetlSJbp3LHdi066+-61FKUYb
  6367. nasR9HmudfUWYHP--3KHHHg5+a6x7L+nI00GRJiYWdGKUdDg-KdnGTXWf2qtH0EFdjIdh
  6368. nfGEOqp6q35havKGT8eTPkNwRWNcoX9Ge9zkd6Wa+ikpd7G4QO2PeqG0hNy2SUpMr-PHu
  6369. nUZDfgRUkVSR+Vz0Bvl+8SrlQS-A7zmtSnRqgJrCnRSYzyTu5GpkaeQHxs5jM5C350KJL
  6370. nbeHJdj6pqWZh-FxLsg+ZjQnJyxh29hvzHfnz5vJfH8tfsxiAOhWij+NPuQcn4-XS9JHe
  6371. nGdh01ztuKVtbVwU4dMHT00jVy+Mw5NOFLXvDoLEn0pS+RFiidme0+f1ngZM+UaaL9u33
  6372. nWwvap2hOLcsJiaDeb723Nc1RlWLK41MSQ7oKLtbAIGtRphRx-sSii1PFkcNRyIbIcHaC
  6373. nAcgYnbwt38MVG1Z4tteFrgp0ZmMq8HX7IwymQsSsx9zQnoTxkLvZK6QzCDYByCnFqXqo
  6374. nDLlro57qCu9rx5+b5lFTh8Zneq5XoyjMGBzWZPqhT4KguYLrtCJ9Zx3fvg7-ShRBNGRq
  6375. nAoIri1jOrDiB8llrxkdFODaupV3Azpk0r7N8cwjmdEmRFjDLmW4WTVaKCRwf4wYy4DW0
  6376. n6VSztKhr2JzvEuGpLGOVnFg6UIwbT8e4TPAzkoTlQMxexEnRqp1dzqA1XrjbXIQiBbkh
  6377. nVszr1FGFtkMb9gcin5sYSovq0xYjNLyTHP9HQlv8fgWNZ1AZtveQhr6SjXPbqf7fDwtB
  6378. naIFzvBbrNcQzNHqLISCU3xMoe5yUvPConOWDojMbbWsNfgyspiom0HQFvxu5mAQjwq2b
  6379. ncHVKO1p683d3N1BAEL6SvHOxP+Uj7S3KZhuqwZuFMnmLaMNFDd1aNHMw-mNkweQyY0fq
  6380. nFbUuVFfSTtY9Hm8DnvXl0Q-gn5uNqE8sQ-5GrzQ7DhfrGRwbP6w-Sg71AHfrqGok3oMv
  6381. nYoSR7Dnr43ox+tVuDxM09RXGkCvL+DT4h-Phx00+LscRB8baUr1dQ11XdH-nAfVN7WWs
  6382. niNuUpippF4Cvi3wRTR-Aykn1THge8roiUMeOESwilU5ctheu5UNat48s+vr-qyIYG7ud
  6383. naPlx+lb6xZsYIVO40TakrvUzruUmTvPuStFL9dyy4+tTdilmmqnJzh+HBXygN3iiD-f7
  6384. nAi9h63tzAljCBA-vE9cufBfKxIh0WzctWlPts8U-78pkH6m1KINZzCI1hrH+RzfZ68y9
  6385. nEYISOajz7M2wy-uZKRfLnC+yC9s1iK4Ne5amX3G6qNztS5UJ2HuSB8uj+pZV5gL9BJe6
  6386. nObuRhfahrNOEnCQO1xz18mSXdSpCWCQMDgAvYgZ1-xF5v02-JGxhqzYkKPsAUhcI64eX
  6387. nGe3LKqO6Xm2l-UTHwGwU+s+a0g9yBQ2Lr09HUxwQeD7X-d5HyOEwUHP5sirU6zpiWr7r
  6388. nh91DnTaqisUTv+Xv99D+AqyaZCPRvm649rGX7EKhj57H32QomynQE+8wlgIw0C7Nzfpp
  6389. nl-ChVqgYKfMq0m2cJm3jHhfaWKuIS2zo9XaH4af-vPRHUgka1E2V3XNerChHJC4+JTZo
  6390. nuDPG2woLO-y2n7E1Bmfj1TYrpl5ZnG2AH+0fplKyLLWmkAyJnMFLApNsBJAc4kjq8QwD
  6391. n9Ptxmxg1FdXl9oCb9o7nRC47UbrlEA2eqsNCTqDtargITURKSFUkkji5EAQXtX2bn8A8
  6392. nib5UVj7uwIJKv0XkwS3BElV017LwE9tGBUG-G-voi3yoPK8JYW4cBXgGkRO22gK-hlnS
  6393. ncoUtx-o8DRdefp9UdEWw9-4o3meQOjP-0kGTlDaYlAiJS5uVP45CkBCL8b0ZsGi5Zmed
  6394. na4DpSvyMftal8vSRWPyogyyyLWUJ0UFt164L62fz3r1niOR+q5Cxc7PWL5UZogV2C2W3
  6395. nYyr8u1CCIg0FnQAMI6sko9EfTzX0cOMES6CWDDO3Uvt7eIbCRmEZgLcH2s5f3HaHod5G
  6396. n87AuEnWWkbaT6Es+6oP+U9Bmn8tQ1yxDJWPbJ8Vz4LIwJ9hF83J9MFqNJwc6bTgc4Lv9
  6397. nmo4N-jgoLeZBzO389Jqjp2nlio2sOnksg2Cjnevw5sMvNCRxxHALKKRO3xJjy4TbqXID
  6398. nGhNdxoyrnfdtvZnfkbfbiZJp1pULpobfWZ0Jj4uRRIDxqXedpaZRpR0kRYrRyhcu8RJQ
  6399. ngROpxc3OOurHKSxABRxuLpqxQzoeE5LKfr4iKaw3xDJfupN7OyjfIgrzrTyh8-Lcnzyx
  6400. nzmbtqJdEPBoOumffufLfOihKfOwhgcfpHajhlZLfBumfjQJg5fKwOgYGqqr9f+jjf8Ww
  6401. nvMvNFRKr9oQrp8APZW-bsLp6L3irhi5-qUSg1LLpxFi+J-4ugqvJTShefJ8xhLt1PNp4
  6402. ni+XRFepZLJAfGLEtK4eBx80pTfIqWefe7KhhLPqwtY5fyhfpxQtzddDjfuw1L-bateyv
  6403. nulMfAdjn4mX9Mla4skKHmNEtXVx9gjXFw3svuS3tQhKHHeMkw+5DK26MVYxbx8PyHB2z
  6404. nlV8oX8Azg264z3YHHltxfDzk4-NQyH11HvkXIris5rXowKiolzE11lqpzUzkXJ5AG5gz
  6405. nWt0N4TbzgWu+ERNVy3q+3w2pMy6t-Qq311QATuIBYK2sRVKQlZo7tps33po3Zpw3Jpo3
  6406. nppk3pp
  6407.  
  6408. Chapter 44: A keyboard macro program
  6409. ====================================
  6410.  
  6411. Stuffit is a utility that automates the keyboard.  You can
  6412. provide a script of keystrokes and Stuffit will automatically
  6413. type them into your application programs.  What makes Stuffit
  6414. different from other keyboard macro programs:
  6415.  
  6416.   1. The keyboard remains fully functional the entire time
  6417.      for additional manual input or correction.
  6418.  
  6419.   2. Stuffit works with intractable programs that throw away
  6420.      keystrokes, bypass DOS etc.
  6421.  
  6422.   3. Stuffit watches the screen.  It does not just type
  6423.      blindly.
  6424.  
  6425.   4. Stuffit watches the clock.  It can wake up your computer
  6426.      at any time of the day and run programs.
  6427.  
  6428.   4. Stuffit can handle large scripts, up to 64K.
  6429.  
  6430.   5. Stuffit lets you generate more possible keystroke
  6431.      chords (combinations) than other products.
  6432.  
  6433.   7. Assembler source code is provided, giving you the
  6434.      option of adding new features to the program.
  6435.  
  6436.  
  6437. COMMAND LINE PARAMETERS IN A NUTSHELL
  6438.  
  6439. +0                  Delay until the application has used up all
  6440.                     the keystrokes in the type-ahead buffer.
  6441.                     This is useful for applications that throw
  6442.                     away keystrokes fed to it too quickly.
  6443.                     This is also a handy way to flush any pending
  6444.                     (uneaten) codes from a previous invocation of
  6445.                     StuffIt. e.g.:
  6446.                     StuffIt +0
  6447.                     empties StuffIt's internal buffer.
  6448.  
  6449. +hh:mm:ss           time delay. (hours and minutes optional)
  6450.                     +4   means wait 4 seconds (must be 0..59).
  6451.                     +2:4 means wait 2 minutes and 4 seconds.
  6452.                     +5:: means wait 5 hours.
  6453.  
  6454. =hh:mm:ss           delay until a specific time of day (24 hour
  6455.                     format)
  6456.                     (hours and minutes optional).
  6457.                     =16:00:00 means wait till 4 PM.
  6458.                     =00:00:00 means wait till midnight.
  6459.                     =0   also means wait till midnight.
  6460.  
  6461. nn                  stuff a given character code
  6462.                     e.g. 27 for Escape, 13 for Enter
  6463.                     Only ASCII decimal numerics are accepted.
  6464.                     There are no mnemonics for control
  6465.                     characters.
  6466.                     See ASCII code chart in your IBM AT tech
  6467.                     Reference.
  6468.  
  6469. @nn                 stuff an extended code preceded by a null.
  6470.                     Only numerics are accepted.  There are
  6471.                     presently no mnemonics for these characters:
  6472.                     e.g.  @68 = F10, @73 = PgUp etc.
  6473.                     See table following for common codes.
  6474.  
  6475. cc:ss               specify both the decimal character and its
  6476.                     scan code
  6477.                     e.g. 43:74 to mean the Plus key on the
  6478.                     numeric keypad, rather than the ordinary plus
  6479.                     key. See table following for common pairs.
  6480.  
  6481. 'xxxx'              Stuff the characters between the quote marks.
  6482.                     The string itself may not contain 's.
  6483.  
  6484. "xxxx"              Stuff the characters between the double quote
  6485.                     marks.  The string itself may not contain "s.
  6486.  
  6487. F70,20,5,01,"Please enter your phone number"
  6488.                     The absolute FIND command.
  6489.                     Wait patiently for text to appear at col,
  6490.                     row, length, attribute.  The attribute is
  6491.                     optional.
  6492.                     StuffIt searches starting at column 70, row
  6493.                     20 for the string "Please enter your phone
  6494.                     number".
  6495.                     It waits until the string appears.  The 5
  6496.                     means allow some slop.  The string may START
  6497.                     anywhere in a window 5 characters wide.  It
  6498.                     does not mean the whole string must FIT in a
  6499.                     window five characters wide.  See note below
  6500.                     on Stuffit's co-ordinate system.  The 01 is a
  6501.                     rarely used feature.  It means, the match
  6502.                     only counts if the string is displayed with
  6503.                     decimal video attribute "01".
  6504.  
  6505. P10,1,160,01,"Please enter your phone number"
  6506.                     The relative PROMPT command.
  6507.                     Wait patiently for text to appear at relative
  6508.                     col, row, length, attribute.  The attribute
  6509.                     is optional.  Stuffit searches for the string
  6510.                     "Please enter your phone number" starting
  6511.                     left ten columns, and up one row from where
  6512.                     the cursor is.  It waits until the string
  6513.                     appears.  The 160 means allow some slop.  The
  6514.                     string may START anywhere in a window 160
  6515.                     characters wide (two lines).  It does not
  6516.                     mean the whole string must FIT in the window.
  6517.                     The 01 is a rarely used feature.  It means,
  6518.                     the match only counts if the string is
  6519.                     displayed with decimal video attribute "01".
  6520.  
  6521. !                   Reboot. (=0 ! will reboot at midnight.)
  6522.  
  6523. /F:MyFile.Txt       Read commands from MyFile.Txt instead for
  6524.                     from the command line.  This command may be
  6525.                     only be used on the command line, not nested
  6526.                     in a file.
  6527.  
  6528. /B:512              Allocate room for 512 bytes for the script.
  6529.                     You must allocate enough to store the ENTIRE
  6530.                     script once it has been converted to a
  6531.                     compact internal form.  On initial loading,
  6532.                     StuffIt will use a minimum of 512 bytes, or
  6533.                     automatically expand to whatever is necessary
  6534.                     to needed to store the compact tokenized form
  6535.                     of the input file.  If you want to save a few
  6536.                     bytes you can prune it back using the /B:
  6537.                     command.  Future versions may do this
  6538.                     automatically.
  6539.  
  6540. /R                  will Remove (Unload) Stuffit from RAM.
  6541.                     StuffIt is a TSR and so stays resident in
  6542.                     RAM.  The overhead is minuscule, a mere 1232
  6543.                     bytes, half of which is the buffer.
  6544.  
  6545.  
  6546. CO-ORDINATE SYSTEM
  6547.  
  6548. The co-ordinate system Stuffit uses for the FIND command is very
  6549. familiar to programmers who poke bytes into the video REGEN buffer 
  6550. of display adapters, but it may seem a little strange to someone who
  6551. has a mathematical background.  Mathematicians have two systems:
  6552.  
  6553.   1. X,Y co-ordinates where the origin 0,0 is in the lower
  6554.      left corner.
  6555.  
  6556.   2. Matrices indexed by row and column.  Usually rows and
  6557.      columns are numbered starting with 1.  Rows are
  6558.      numbered starting at the top.  Traditionally co-
  6559.      ordinates are given in the order row, then column.
  6560.  
  6561. Stuffit uses a hybrid of these two schemes.  It uses row and
  6562. column, but starts numbering at 0,0 instead of 1,1 in the upper
  6563. left corner.  Stuffit uses column, row order.
  6564.  
  6565. For relative positioning in the PROMPT command, left and up are
  6566. considered positive.  This is the exact opposite convention to
  6567. what the FIND command uses.  Beware!
  6568.  
  6569.  
  6570. EXAMPLES:
  6571.  
  6572. Format floppies alternately in A: and B:, without answering any
  6573. prompts:
  6574.  
  6575. REM EXAMPLE 1 FLOPPY FORMATTER
  6576. echo off
  6577. :loop
  6578. Stuffit ' ' +0 13 P25,0,5,"Format another" +1 'N' 13
  6579. format A:
  6580. Stuffit ' ' +0 13 P25,0,5,"Format another" +1 'N' 13
  6581. format B:
  6582. goto loop
  6583.  
  6584.  
  6585. Use one PC for both backup and Host GW on a LAN:
  6586.  
  6587. REM EXAMPLE 2 AUTOEXEC.BAT
  6588. Rem Start backup program in batch mode:
  6589. Rem Use Stuffit, to reboot GW program at midnight
  6590. Stuffit =00:00:00 !
  6591. Rem Start GW program
  6592. LAN-GW
  6593.  
  6594.  
  6595.  
  6596. TROUBLE SHOOTING
  6597.  
  6598. PROBLEM: Stuffit fails to send all the keystrokes.  Only some
  6599. keystrokes get through.
  6600.  
  6601. SOLUTION: Your application is clearing the type-ahead buffer from
  6602. time to time.  You can outfox it by using the +2 command to
  6603. insert a short delay AFTER the program has cleared the type-ahead
  6604. buffer before Stuffit starts poking characters into it again.
  6605. This can be combined with the F and P commands to hold off
  6606. generating the keystrokes until a omen appears on the screen that
  6607. the program is ready for input and is not about to throw away the
  6608. keystrokes you feed it.  Sometimes you must combine the
  6609. techniques, an F or P command followed by a short delay.
  6610.  
  6611. PROBLEM: Stuffit just echoes its command syntax summary no matter
  6612. what I do.
  6613.  
  6614. SOLUTION:
  6615. Stuffit is laconic in its error messages.  It does not tell you
  6616. what you did wrong.  You have to guess.  The way you do this is
  6617. to take out all your commands.  Then add them one by one.  The
  6618. one you last added at the time of failure is the one with the
  6619. syntax error.
  6620.  
  6621. Note that Stuffit completely analyzes the script before starting
  6622. to send any keystrokes to your application.  If there is even one
  6623. tiny error in it, it will not do anything.
  6624.  
  6625. PROBLEM:  My program insists I use keypad - minus.  Where do I
  6626. find the magic colon pair for such keystrokes?
  6627.  
  6628. SOLUTION:  There is a list of the most commonly used pairs at the
  6629. end of this document.  See the IBM AT Technical reference manual
  6630. for more information on system scan codes.
  6631.  
  6632. PROBLEM: You referred me to the IBM AT Technical Reference Manual
  6633. for scan codes and ASCII codes.  I don't have this expensive
  6634. book.  What can I do?
  6635.  
  6636. SOLUTION: Call Falk Data Systems at (915) 684-7670, 5322 Rockwood
  6637. Court, El Paso Texas, 79932.  They make an inexpensive wall chart
  6638. that shows the ASCII codes.
  6639.  
  6640. PROBLEM: I want to generate Shift-PrtScr.  There does not appear
  6641. to be a scan code for this combination.
  6642.  
  6643. SOLUTION: BIOS processes Shift-PrtSc and Ctrl-Alt-Del directly.
  6644. It does not put them in the keystroke buffer.  Perhaps a future
  6645. version of Stuffit will simulate Shift-PrtSc.  (The ! command
  6646. does simulate Ctrl-Alt-Del to reboot the computer.)
  6647.  
  6648. PROBLEM: the F command does not work to fetch a script out of a
  6649. file.
  6650.  
  6651. SOLUTION: The command is /F:, not F, for fetching from a file.
  6652. This is confusing.  The F command is for FINDING a magic string
  6653. on the screen.  Perhaps you forgot the colon or inserted spaces.
  6654.  
  6655. PROBLEM: My program does not seem to recognize the keystrokes.
  6656.  
  6657. SOLUTION:  It is unlikely, but one possible cause is this:  when
  6658. you DON'T use the colon form to give Stuffit both the ASCII and
  6659. scan code, then Stuffit fakes it by using 2 as the scan code.
  6660. Most programs do not check the scan code, but a few might be
  6661. confused.  Stuffit generates the proper scan code only for a few
  6662. keys -- BS, Tab, Esc, Enter.  If your application needs a
  6663. specific scan code/char combination, you must use the CC:SS form.
  6664.  
  6665.  
  6666. HOW DOES IT WORK
  6667.  
  6668. Most typists can type faster than programs can process
  6669. keystrokes.  Thus the BIOS stores keystrokes in a type-ahead
  6670. buffer.  Stuffit works by sneakily poking keystrokes to the type-
  6671. ahead buffer when BIOS is not looking.  Stuffit thus has no need
  6672. of taking over INT 16 to control the handing over of keystrokes
  6673. to the application.  The advantage of this method is, Stuffit
  6674. works with programs that sneak past INT 16 to use the Enhanced
  6675. 101-key keyboard features.
  6676.  
  6677. There are 254 different extended ASCII codes that can be stored
  6678. in a byte.  However there are control sequences such as F1, Home,
  6679. Ctrl-F1 which don't have a 1-byte code.  These require a two byte
  6680. code, the first byte being a 0-byte lead in.  Stuffit can easily
  6681. handle poking that pair into the keystroke buffer, using the @nn
  6682. feature.
  6683.  
  6684. There are some keys duplicated on the keyboard.  For example
  6685. there is a + key sharing the = key.  There also a + key on the
  6686. numeric keypad.  Most programs do not care which + key you
  6687. pressed. Some do.  These programs find out by using interrupt HEX
  6688. 16 function 00.  The processed character is returned in AL and
  6689. the semi-cooked scan code from the keyboard is returned in AH.
  6690. If you the program is picky, you can get Stuffit to generate the
  6691. precise character and scan code using the cc:ss command.
  6692.  
  6693. Because of history, with each new keyboard design attempting to
  6694. maintain partial compatibility with earlier designs, the process
  6695. of generating a keystroke has become more and more complex.  Each
  6696. keypress down generates a code, as does each key release.  The
  6697. keyboard itself translates the codes from row-column on the
  6698. keyboard to a raw scan code format.  Then the keyboard controller
  6699. in the PC (a miniature computer in its own right) translates them
  6700. again.  Then the BIOS translates them yet again, and matches up
  6701. the ups and downs, notices chords (multiple keys pressed at once
  6702. such as Ctrl Alt and Shift) and generates the keystrokes and puts
  6703. them in the keystroke type-ahead buffer.  Further DOS, with its
  6704. KEYB utility, may interfere with BIOS to support foreign
  6705. keyboards.  So you can see the term "scan" code has many meanings
  6706. -- depending just where in this assembly line you look at the
  6707. codes.
  6708.  
  6709.  
  6710. SCAN CODES
  6711.  
  6712. Here are the Stuffit codes for some keystrokes you might want to
  6713. generate.  See your IBM AT Tech manual for more:
  6714.  
  6715. 43:13       plus + on the equal key
  6716. 43:78       plus + on the keypad
  6717.  
  6718. 45:12       minus - on the on the underscore key
  6719. 45:74       minus - on the keypad
  6720.  
  6721. 174         <<
  6722. 175         >>
  6723. 65          A -(normally use "A" instead)
  6724. 07          Bel
  6725. @83         Del
  6726. @80         Down-Arrow
  6727. 224:72 @80 Down-Arrow on the arrow pad
  6728. 130         e acute
  6729. @79         End
  6730. 13          Enter
  6731. 13:224      Enter on the keypad
  6732. 27          Esc
  6733. @71         Home
  6734. @82         Ins
  6735. @74         Left-Arrow
  6736. 224:72 @74  Left-Arrow on the arrow pad
  6737. @3          nul
  6738. @81         PgDn
  6739. @73         PgUp
  6740. @77         Right-Arrow
  6741. 224:72 @77  Right-Arrow on the arrow pad
  6742. 09          Tab
  6743. @72         Up-Arrow
  6744. 224:722 @72 Up-Arrow on the arrow pad
  6745.  
  6746. @59         F1
  6747. @60         F2
  6748. @61         F3
  6749. @62         F4
  6750. @63         F5
  6751. @64         F6
  6752. @65         F7
  6753. @66         F8
  6754. @67         F9
  6755. @68         F10
  6756. @87         F11
  6757. @88         F12
  6758.  
  6759. @120        Alt 1
  6760. @121        Alt 2
  6761. @122        Alt 3
  6762.  
  6763.  
  6764. @123        Alt 4
  6765. @124        Alt 5
  6766. @125        Alt 6
  6767. @126        Alt 7
  6768. @127        Alt 8
  6769. @128        Alt 9
  6770.  
  6771. @104        Alt F1
  6772. @105        Alt F2
  6773. @106        Alt F3
  6774. @107        Alt F4
  6775. @108        Alt F5
  6776. @109        Alt F6
  6777. @110        Alt F7
  6778. @111        Alt F8
  6779. @112        Alt F9
  6780. @113        Alt F10
  6781.  
  6782. @30         Alt-A
  6783. @48         Alt-B
  6784. @46         Alt-C
  6785. @32         Alt-D
  6786. @18         Alt-E
  6787. @33         Alt-F
  6788. @34         Alt-G
  6789. @35         Alt-H
  6790. @23         Alt-I
  6791. @36         Alt-J
  6792. @37         Alt-K
  6793. @38         Alt-L
  6794. @50         Alt-M
  6795. @49         Alt-N
  6796. @24         Alt-O
  6797. @25         Alt-P
  6798. @16         Alt-Q
  6799. @19         Alt-R
  6800. @31         Alt-S
  6801. @20         Alt-T
  6802. @22         Alt-U
  6803. @47         Alt-V
  6804. @17         Alt-W
  6805. @45         Alt-X
  6806. @21         Alt-Y
  6807. @44         Alt-Z
  6808.  
  6809. @94         Ctrl-F1
  6810. @95         Ctrl-F2
  6811. @96         Ctrl-F3
  6812. @97         Ctrl-F4
  6813. @98         Ctrl-F5
  6814. @99         Ctrl-F6
  6815. @100        Ctrl-F7
  6816. @101        Ctrl-F8
  6817. @102        Ctrl-F9
  6818. @103        Ctrl-F10
  6819.  
  6820. !           Ctrl-Alt-Del
  6821. @117        Ctrl-End
  6822. @119        Ctrl-Home
  6823. 12          Ctrl-L
  6824. @115        Ctrl-Left-Arrow
  6825. @118        Ctrl-PgDn
  6826. @132        Ctrl-PgUp
  6827. @114        Ctrl-PrtSc
  6828.  
  6829.  
  6830. @116        Ctrl-Right-Arrow
  6831.  
  6832. @84         Shift-F1
  6833. @85         Shift-F2
  6834. @86         Shift-F3
  6835. @87         Shift-F4
  6836. @88         Shift-F5
  6837. @89         Shift-F6
  6838. @90         Shift-F7
  6839. @91         Shift-F8
  6840. @92         Shift-F9
  6841. @93         Shift-F10
  6842.             Shift-PrtSc -- there IS no code for this.
  6843.  
  6844. CREDITS
  6845.  
  6846. Terje W. Mathisen wrote Stuffit and the first documentation.
  6847. Roedy Green polished the documentation.
  6848.  
  6849.  
  6850. PAYMENT AND LICENSING
  6851.  
  6852. This program is absolutely FREE.  Terje W. Mathisen doesn't want
  6853. money, he has money.  What he wants is recognition (admiration?), from other
  6854. programmers.  You may use it for whatever you like, but it is not
  6855. warranted for any purpose.  Copyright 1991 by Terje W. Mathisen.
  6856.  
  6857. Terje W. Mathisen
  6858. Oslo, January 1991.
  6859.  
  6860.  
  6861.  
  6862.  
  6863.  
  6864.  ---------------------------[ CUT HERE ]---------------------------
  6865.  
  6866.  NSTUFF310.ZIP
  6867.  E100 FC BB 03 00 BF D4 01 BE CC 01 33 C9 AD 86 CC AA FE C0 E2 FB 4B
  6868.  E115 75 F5 B9 FF FD BA 20 02 52 B4 3F CD 21 5F 72 60 8B F7 50 8B C8
  6869.  E12A B0 2A F2 AE 75 55 B0 0D F2 AE 87 F7 BB 00 01 B2 04 AC 3C 2A 72
  6870.  E13F 62 74 46 57 BF D2 01 B9 40 00 8A E1 F2 AE 5F 75 35 FE C1 2A E1
  6871.  E154 88 27 43 FE CA 75 E0 56 BE 00 01 AD 86 C4 8B D0 AD 86 C4 5E B1
  6872.  E169 02 D2 E0 D3 E0 D2 E2 D3 EA D0 E1 D1 EA D1 D8 E2 FA 86 C2 AA 8A
  6873.  E17E C4 AA 8A C2 AA EB B1 BF 20 02 58 33 D2 F7 D8 13 D2 F7 DA 33 DB
  6874.  E193 8B CA 8B D0 B8 01 42 CD 21 8B 0E CA 01 CC AC 3C 0A 75 FB AC 57
  6875.  E1A8 BF D2 01 B9 40 00 8A E1 F2 AE 5F 75 D0 FE C1 2A E1 86 E0 32 E4
  6876.  E1BD 8B 1E CA 01 03 D8 89 1E CA 01 E9 6C FF 00 00 30 0A 41 1A 61 1A
  6877.  E1D2 2B 2D
  6878.  G=100
  6879.  W220
  6880.  Q GXDPlus 1.0
  6881. *XXBUG20--00002907--29041991--49A842E3------------------STUFF310.ZIP
  6882. nI2g1--E++U+6+5pAbFMqbeoTRVQ++6Yz+++9++++IpFJFYN7J0t2HoChCqhr4Xamrna5
  6883. nDr+zOTkZxUZaODnavCk4qt0k2nwiY7j7zGOu-KXR9TKopA5gfxyeYjd3kBZvxXcnYu4E
  6884. nGeJueJtihxehaQqLmsbhriiEpLwyQqBNbYPQWcUhhameFPFZ5nAV3+hiPU6qH1ANgu0D
  6885. nGBehtmzHtuTNeAEc9NC4QNNP4IivNLPB9SCtpEYUBD-Fg-SlLKWSFJr4jiaQVJmpKqaa
  6886. njwh6k2MHNX8pH0xlbP4NTc3hL2KgE9yFQJlUZ04DsqqvNPSdEBk7YwdehhJtlbWOlj0x
  6887. nZJclE9z8S49Um8x6IA6FewTMPYJmiFGNI7MhAtok1NWmYYlM54OuF15+en6KRBawRVSK
  6888. nWMF9NRUm-s9Ujmf2UrZABkPAAUA0NG7k9zkgBF+MFR6jGfX8sGydoVmibf3ENtYU13pr
  6889. nL9xPrJxb9kOsMBRsqMm5ZWxWIR9bC4vLaRskji3PTq13n+t6BSL4gDib4FAqx0SQpIvU
  6890. nBZlvMM2sED9+hsZZYEOUodPx6nRk-D1Q6pz2IYLlpaAurswdX5LssV0-mC4f3w5mpAYe
  6891. np+bQL4ES5ueAqV8zI-3kRwGrd+JNLdDa1yQVsXIg+rv2D3g7fopkNnX7ObNtzfjTR33h
  6892. nWcIpG+NP0GImPUJ9B2UfpQN6t4n7CYxRiBNNNBUl29qEWVHAb01PZRQQc0z8EpjERxJZ
  6893. nEqB2+fUmNi0u6H-1Fk6BlShxp42fyJqe3R2-GDlFCWLp-FuUgg1LGanMIb0PNwVJHOnl
  6894. nvCUuUvlvSbUMDhunntD52LgSHcQDczZcCaCHFnNYXpzagoyXntxlsTgSyy5bLgH+tplN
  6895. nuFGrPYBfPZViF6Ggt55g8RntwTNRq8pI-23JCSJfkGCqmB5IijhrnxT+2Yb59DDM4IZ3
  6896. nEJqpxyx5TOwTjkFeUIYUMugpynCLsEhduJhbwxVclYa9hUnl+M7Zb7gpeKEe3AdVDsfX
  6897. nL63cV1cVwFfbH1X6FrmLCYRiTBSSaLet5oLVZNbcffe1BxSkxvrxrsgYhP7kPlDv1Uyq
  6898. n6YAzIr6Tl9xS1t7YM2lRSaVk2Sd+ZlqjRNstnth6ZODnRhf6stDxtvszVzwYUcCUBVls
  6899. nTguA09J0IobEMGk2urKv3nQb-mHkjXwsfyzjZkQX2GKqEvgj-cDuvUh43u0vzfPbfZ3B
  6900. npHYneEXZIcOZno3zQxkz7mHv1pne9C5q+0zSshu-0zkKL+tuDTWbTUi9XxotSrssh6Zq
  6901. nvBiIm2X7pRcSr6XqUffylgNqGuYThlfI8y1NGbsLWcJfXayEm2Xd1qVYRxJZzGgmu727
  6902. nSGcu91Vn5pLZxbRybZGwNQDNrKE0kUdZkaCawYFYAUH4Nc9lA-Gd3R3-UlOs0DtJQ2YZ
  6903. n2epktt8SJqInTQ03ZFQud4Yn6HlNtAJljIJDFmzNtDO-1STAWb0xTzRII8UF0i9jVnoA
  6904. nxjlJH9lOcG6FiLDGH6EWQY2N-ov2QTQBjirbJ6ofyzT06IMcWkVqaKPLw3KBCsArNAoy
  6905. nL3unrxUsu5LMVugnyBzbpNTIFli5SCfWa8KCMvr-hwt78U2Gb1wZVcJVosm7MKGwKvPE
  6906. nRiq0-OwiZKuW6IdfxVxiA4nsWTOSbkqinj2hE5CVEtvXrC-XkvGejRUvDpsAi0vZIMRZ
  6907. nb0620VMEWQsWeLWqNGZUqsw0hbNzldyIGyzerfr0nvgx1sO9kIfdgMKk4snd2TlbfX5e
  6908. nsRa9CKlAnBUAXkIqWbU7evQI0u6hQObMCrTy2Ntzx5wwDx6tLcr6q5yycyrTcSD6oH4y
  6909. nubLujQt3dlRoXdtXkEq3sQ-vAhBofNJ+uGl2RbHsmblVR7k1PwOHlrhWBZS5zApLx8+d
  6910. nhx9N1taASALE+sAMkHAAOoARRzNjnzGakq8VJbPRUNJklkIQv8xQTaPmU7MIfojrvNX-
  6911. n+-oIYFj9AshgR2HZWK9+ALMkhCfr0WREwDwEJkwO+f9u+5YHGkyEeMKSzVH5iY9o3kSo
  6912. nUtskXcP-X2tUQunHdfOUagnakybwECGchVjmX36lnXNGFM1eceuj4lY7mZvq6mVncx6z
  6913. nPBMufcv5+4UwaFDyzFXwcIjtLSkt3lq+EWhRWDWEX9EeQddr-cFuudk9v13PMoLW4R69
  6914. n8Akxc6Iw2z5KlTYynr+d4v4sElR9A8YvF+3g1XJ6oH0tfAgFXcmYGKCy-QmMj-tUczTQ
  6915. na-HdahcTxM6XgijbcBQ7Cg3ZvnwnP9UZhwXdtybHkzDwzwCo0tE5cUcRRztB4xyDE3MF
  6916. nN7SJiKhdnorXr6zWNykebQ9yvP3MkdIlt0BzMHfoeiMdElFMPe-wVwncQ56MtdY-IeLd
  6917. nja5p-qmosEe0mxtPRbzUdRxl-jjh5Z1z91EYgqH5ReBN97Ik7wo8mK2rxPNfc0y7W1TS
  6918. nMKz+DvDJkn6U+rvHJUwMNwC+TqufjykBTlROqmsvzer5Tb4pj6l+O27Zub40qrwR1luq
  6919. nMla9vjnJZhhtJ-WfHv-fOuEm3VQgxO4Q1HSE4XcI79miHzs944f5EfnVs-P0ARo3TUpQ
  6920. n5Lc1Z++ucUBqX6eqF6fdXfS1Wu1TL14AMmkHc2o-hKXMi4GlhLIndvfK+GL-eWdd3Gwk
  6921. n0OLnpFfxZP3Mqo6IcwTtN1cu3-4v6ek8-JNDgDGn24Htufj6f0ifw2CS9YZtO8iW+mP8
  6922. nLIl9+0Gh-2WgCJNFCaz58eEQk4XUJk6vYnn-l9nYFMQRYb8XCAn2OsfG+M6rOy+3o6za
  6923. ncoEcXC5Nxc0NO3V-qJO1NwLRf5sFGjtHY8cZ-pH3qNGfuN9+4NggeQ0rsMcS1wCzsyqK
  6924. nsg01vaGyRIJmZaOt6b2gSDU0X23HlFByjFoQZ+ExOcmBQzEC1Ctie7048VtVxT0EeHRM
  6925. nu1FpiWxY+EZBFO9V4gRT36fpd5mOmBOaksSTF8HYmiOn8Hoa-dbBhsNZkgU60z7G5IWX
  6926. n+P3nVr-sFeJ3k6Gp3VDagSWUoe-T1zdbzHSMqq3f5WxFJdip1BS6+pZOetBVFTLoOLcz
  6927. nSFnCFqnqPHMTDG-oHiek4qCJhwxBnJffqEAS+FFjquoZHqEgSMOOs4is0HohOzWgLsEL
  6928. nDrIo26jngxDFlx4X7t0pKpWeQauNwMWby1Nps3i9Sc7GBY7U1H8KpfcbVuiJ6BrHWQ05
  6929. n4otfhx1+CPs9Oy4ZHYeqmbFCyjBETWDllJqXri9PtmtRusbwoTZKtsdlsM-DRSJ88hPf
  6930. nx7+3zf49xOMgzp-w2SdASQtHpkBCnaF6P6X2euhyI4h1FHsC+T8ya7lA5PuUaZhFe5Rl
  6931. nWeg-IMU1ywj2Vxsk67ZBOJQNhDmsYcfCm1G89H7Sh4rczHkhGjLZZT2sJliHNN6Dge9U
  6932. n1nsKwJCrrXAXRS3gjJpYAj8ikrUSVw-usSAZKiTjrqstF2vSF8rlp5ieWRTyHEGQEGQc
  6933. nGAfH3DZSNnZfuau-4kyX0vWoKaRJv7leEtmUaA2LFFfVRAT7p6S7lC7E8vFgt8zPzfpw
  6934. nTvrhWJTog1eZfsJvQVEJnOpihnNf9sq4HG53UCNKPC0ELtnNXjsMDXlz5go4bis2BWtX
  6935. nk6ipQFvHsqElU+9GVkAWwbPE6PLECF7hBduFOYgBmWGpHhCbckTagPC+XHwzDHxzMyCb
  6936. nuQBkDVxBqmoFfXLkSxZi1K8hoof8vy1DyluKDdzv3lqgHVltkfWWph2FSlykRszjM2av
  6937. ntEfAEBhzW+0TVtKqaXZWwAwL6mVeTvsX5oK3AnFsZ-9ksNAqZbrwWU2CNty5XnzQigy4
  6938. nLyNDcnx4RxrPsFmy6wy5RJ0DlTgntCq0cgp2Fq9U3i9VzY6Rx2EyzcDnWZqpI90uSpLe
  6939. nzeJyM9KhrE7GHnxyRJRghyPHdmyrECngoxDHTD9sYR95uFC+5UPJ8wJZH7oo6y1WD6tr
  6940. nKZVRLox3RxZipLd98y3OITZevGntuTCLySHdQM1VJvDvX93Z95VKDBUzhADcfKmreDS+
  6941. nnVvyfdfXHCRqeJzdsRzKbjrrzJ9xoH0YAU9MkNZNOzXPhHS4szZcKawGIWV5l4-cou0Z
  6942. nrT929AEGstomlLGC7RIjS56h-O850FPk3NTcnJkE1EEj83-OG3JY0aGjd3bDJT+CaxQu
  6943. nXdmVyBNfQPQObsgC1T-T3GZU2LavtXGp-M3vhJh8X0-st37p3s5tdlT1Qvt++uRLhSWG
  6944. nikdivJUAidN0MBIMDGCQXZ7lQ6ehzErRFWnr8zZb9WUdVfj0gSJJTQaqeBnLtBDRet9I
  6945. nLIQTUeySfT6GgpKKjn8HkwTA3SWtdSs7CQI7WrFH2lgX4H2DgNOD3cZ6FNM-XEb4k8jW
  6946. nQGZfK3P2ARvIMwMvFl7YaKapwcfdEU1BJb1b6WJ5Dh7O3pZG5cZQlYsziJG5BGhpkCpH
  6947. nqBlqoljcYlNMIFR33cwEl-bXK+eg+msKnv5jp823Mr1fbky8OPnGhJiSNrFPMgsXph0c
  6948. nXpnC1CUYXEKx-3nlSDjDOj6-Qm-j1JJddDEJeh3frXBqsU7yuyc9k56A0OV+0cWqLU6Y
  6949. nXUsftZeEyw+yk+oQ-4Mr36ExP4iCpIU1QdlEViHO0ynI-Q+otM85+eN7ivKI8j7tzoe4
  6950. ny91vXU3NVwb1RSoSTqjuAhwjcW+xVUC9f0PFnUEGGcUd4uMSV-RCisIQcfJMyBBVbUVZ
  6951. nTFYHxzgqqNng-gDBf4W9yJYMSfrQ66NIvW4XjfYe+iqmOKCOH29Z74HcsPkzrLRUqMRX
  6952. n1vI18unYA8cq5tY6r2GxgpvrwKPWBFIU00nu9PFy8QO92+Yira5a5Ff+aAQjv7tPnaMi
  6953. nS2OK5Rw23mTgwjfwxCcGmz+LNzoyayfkNOBpp4vRuHmn5HO8qHAr4WvlmYq5LRrQbDKR
  6954. nbKldcUZRXpEZHKm1tp3v2foX54DK4CcWCycLOv-jIWObtHHAP0qLxjEtgvCkP00Kfg7t
  6955. nN988VFjTwUnomMyfelFnAXgjtSrYOMMOXOYs1WlI-l5rvqkKbktXSrcjMVN7b6WWN9Hi
  6956. neh0pyw4jtghFt50ADMhgnJDIs0KZkSqKnsBFEFhHNIMaSTnXZMzFiTpGS8pqWksjpnOc
  6957. nfA8NcZm+MoqibZLmq1q5VJgjfs81LHFh6X-UeWPVQf6uXcPgeoMJ-ySpyVCkyhTlk3KU
  6958. nlVrWDu4WLe2PFT2MWb+vp4d7+MJrsCAu9hmDETPYwGDZViUvWj7gszqhgNVSHNqhmjiX
  6959. nem2jNpnNm8Ewr3KtaZQfSI3d8n2np0ighCm4NHhimVIGQVL93l3jLIO29o2tl-Jmx7Do
  6960. nFYU14nNfcRchdDTyuT5Rb9lcFH6u596-B8B0FQfqgXASIcJGrLpeJsKJBDtI0xbuX-Tj
  6961. nWhw0RrV+BpdCvYLORH9L6bld9bILcYcFGn+gdU8Z2lypxMhn0uApFR0LWddHQyJ94ehm
  6962. nFGRY81gxNPSn1djnFESbAndi7eCgJXJXKOm8ITScb7UdgTy8feNivNoeKWfMSrQraApQ
  6963. nFR+3uNySjc62FXAqaPCjHxDT2INQgRiI5XX2HiCRGqtgoHcjKSPeMiF+ui2PuLDia2-C
  6964. nVYdsNaQoXSy7TaiwR6CK620X-5yFk1YT+nRTzH88PfQOAHpea1jQVtqldiqp2mnGW-4t
  6965. nQiJ48iRMHcRUKMhB5iQgiAFHzAU8bMOnOSKGle0gWvSOUrh3SmbundLZ8p2ymsakOsqa
  6966. nreYaMKj1dQq-Ii6-Gn28esUed1dGE386x+Sxs-Fb6getq47MgShfNbsYdrxlneedqr9E
  6967. ndTMgiKBxCY5WWn17+O3VKEkixIZje7VfGuE3XsnsAwSLrPXU-jUv1XekDV4RRcjQxHXk
  6968. nxPvOUwtNQ6ecbKoGokkq0jzAQLOLImo4joSvwzPCZX91kPMhxKKdJg-u1YZA3IZJ2nNS
  6969. nFL+XQJvNnuVuTO8PIY-Kpjdqbv3C9T5vc3GvJHFwaamZ7VUNRNEv-OXO39KlOunWW3SC
  6970. nQGzZHIK2xtvaKQmuGZJzQyAblRWEaspwrlVvOMusM93kfpB1wVnDrLN89r1QW-kM7ZWM
  6971. njlFg9vRHw6dDMCZ6eOyEtOZZboNzh3j-NHZhnLcxfyl3H-5JFc+c7kGSMJO87NzDncCH
  6972. nblK7D+opg1ie-n-3guVItZoIbn+MKFMnizLgAtLVmvNHZiulK3+OTGqo6UPWM7SgXpOt
  6973. nIbV7FmJtBzlIxOfPfJjV5XOxN4i7Jf7p3GkaC5+OdsJ9sWBVt2dVbss4F-4ZPfRkOdra
  6974. nNZ9APr-a0ZgQJWvQy9v5ZQIGm56Mz-F+uLLVu3fqnaieuxd46MeK+bZefiZAy7Hf3MEp
  6975. nsXV8U8e1ag+WjJ4pBsnvlswP3lbEdJ-tAY4Rv077f+HYNc8kmarWwVagHSBaSbDelpo8
  6976. nzGorMoi9NLnHX42HPcgohO29rhb2a5wLlQwvRiluJKGPNTVLtBlsiElTvtAR0dBqmlJF
  6977. nOUTFmv4nX4q39vSsrbjWlyjnpCZlbfeo-RZc8-0YobYlg7vYgNKdbqVbrjMkzQ+yLvhJ
  6978. nC2joY4kMit67FQ6bx9zBq49bhnDUccO6q-C7znXyXFqdX0PVvdxaLaBdDCzroPTPsbR5
  6979. nChH+65D5Rw8hQanFnCFdWbIIHAvZGZJWB3Gi8GrDy6EHY0Hg00Jvt2G9mdZU1czRQeZK
  6980. nQDXd8Mi2bz-qJNVmBc+SHCuay9TIuLJJ0OpTmdGrmePOfRbRw75RDRqDNVHY3DsN8Obe
  6981. n1d3j2NJSipNvQZ4SnwL8yZUl0JETBQKIhjU3YW7bdc9hyRYUCDDB9VkjNCy9do1wWMjV
  6982. nF3doRPprYTDbVCVWIDOceQ1+Hch3zexQFG6n6Reqkre-ot7vRpFcUr67Mrzt0ruy81zz
  6983. nxOzhpiJ3fGTCHcwJ4aDgmUrgO5VIh1NCqerSJPLoJgHhpcTfApPvdEM2x0e+reXHMIOn
  6984. nPjryyS0enz1f0ZnEmiY1YFiQJThlc7PaR1tQrNH+YO7Jf+OUqZlkBc+nOe-RFjFfh6xA
  6985. nW3W12j07mgsTfegFUMYmi8FWrKSlh9irkOwfy7vfT1WfXyMFTud1bpTr0gwseo4yd+Wd
  6986. nG7qWTjtkv3LXWnrbxategmlwUHWferp7akUFMvy2vg24qmweVCA+DZxKMVfrwLBpfT2N
  6987. nTeuC4tzXtyeGskjwL13qT6aT8mIQLy5bmyfnBLuiK18ykQzLBLdumBTOUU+dj8ujcByW
  6988. nyl1oSxLkVqI-UM6ue2yUTVpotXkBUAzes5A0bRR-3kGue6Ai0LFN-poFu8cCiWPERFpo
  6989. nswvgBEsUnUSxlUb2zO1LC66Y2DEONt+IUZvX2772ICY8kMXYcA2cYYUEB1V3IUa0-eh6
  6990. nAY3kpeGtFpSdqHIKQMM+CfxiU4sFRBY+rS54TUBoXoQoBstkpJY1B2PESEDo2I2L1R+b
  6991. n+DKP4mSseYb2rl3opE1xXe+a2NzFG7drTA+9rHF+XrVWYusb-1LdSgMvBcbsPkEpQIqF
  6992. nW8+-aW4i7V3n-1JNy+LdOZvcTl-x2zEJJnLdyUBlBIzwVeiO3zdTYjRB-TGd6+6jRc0c
  6993. nj1SLCo1Irdif5G0evwrp1V1pxyNa-oU8rCgpUOH-jO+77-LixNh+oi5SqEvljRp-irct
  6994. nYfHyej2BDJA+jKZ+rHBH5oEXw4ROSh42pNsPyD8uwOJzCM8nzUuMbcwUC4y0gPtOS938
  6995. nfyWvlji0LfAGamjCYhmi9rOV89XfmprcKRAFSyVtolhv8AfiyaMLWg8vuSp0ILcrkGsI
  6996. nlLTHrsKWz4vCTfX3neVdjENySie94tANJcUOJLK8Ayyaczj7b29AiQXy6RVL4dW-fsL0
  6997. nPdqhcYriSo0iMZ3oN6eWTDqLj3ARGvDqvS5RVJGs5Ltv41rCaTghovjFswkrpuagL2i0
  6998. nWxySW9RgD-qBOVoIWagHfQGq+n+gjvFPx95ccDUq-0LQJ+4azDuMFsbAW7OzbLFejulB
  6999. nwlb3+7LjI49mE1JTGV8esHy8qyK98ASYd-zNrT+gUoDRI7zvPQwwGnKZaLQurJ9etbs5
  7000. nTf3ZDn0wipQAvROHWLK5zFo1x4l9qvj3VA7zzEhEGkA23++0++U+8bWH3VawLJir2+++
  7001. nHFk+++g+++-HJ3J4FYZI9YBDHLpN0pEIJteyJEpB+nMc8X3Uc-el+KYSnQA53-pFOQI5
  7002. nXkMTy0VnUE6uBhKYunO6XkagSGXha6bNrGGPnOsaaQqCa7ZAkXa9A0QOSwP2mP7aH2vK
  7003. nX1ZbCXcndkaP1MYvaYF0vvpJxl9RmRcSivvvpvrryzyzjjybebdwHqk3085cnk1yx5zP
  7004. nqC1zmyiFcvwRbKqsx6zzE4lpyRD4evkzxTNIEvpfmxMoMo9uASDvT0Ht6nsaTPSojKb5
  7005. nhzbH0JTtPNQi40rQdK-UuKKyTCa5j1dtKdnieI87EvkMEZ3ltzn4UInb-DTOhxO+Mm2M
  7006. nv6wsUAxkBUpMmlod+Aqm5g5KqoTkucZnhsBjQVTljncyUnz9-PbHMcluwfb+ZRxRXvnu
  7007. n94RxlyU17IaTHIP+t3XolD4lpC7n2nwHyRQ4te2YOuvF+ukdmEdEXR4z-5qL3nX7bYhi
  7008. nldx50GxTsEwbzttzlzUFnzB-QYXaUt428vnTr7TzSttHXQFKnkKh7pCkLwO3+DqrBgr4
  7009. nYop6O8xN+kZpMAav8fzYsd9zkhyTKoyg-nTzhCFnkxiz0ooYYhbPjtwRyDepk9ij1PlT
  7010. nR5Dx85XRqiSc-X2cHXgOSifzPTVMoBYr3I2D18m7TDI9zwfsmuWkTgjKk4xDzy9HeRpG
  7011. n2wesPjBTlmRffqSizLZcmdy4NmFcAxPyWnP1zqT1JvfHV1DsYtLU2lu+SUtTiIU1wfSp
  7012. nJGBVGr4yjT-H6LhpXh+cyluKVIoERPVJKF5g8tOjm3hVBwRZBjEe0Csh2vEpPWG69RvC
  7013. nHeWoeUtnb01Y5eXMgOCXcqlLNqTN9ZIJmCS+g2Pqk3uVnSj9ngoFj1v-fm0r7vgWFs00
  7014. nqWKriBjQQei+r7pmDhbXzzbYZdE8DKuDFyW-a-Nj7a018fRsATSxpZLMGwf8vZWdYEh3
  7015. nLNrr70jwelKcElPqB9Q8nHViqGSsJI5iv28xqWtWGkTokFO2vGrSJhaVVuqZ0ATMviv4
  7016. n8Plvmfr6WtM73M7MdPMsP68xaC1J9cQUclNhoIdFPM58xnkzl1InEwUah-K3CTTWKvZo
  7017. nCGNlqUhhkgdZV8yiTLDL17wKauBAMrJwnuRRhpuVqMguvUUB0o2XjlRRGL5NgV6GJMqz
  7018. nApRHHJNXpPP4988A166mvUf7cuRyVYAJr6d+dd4JHb4jkmPqsjy8MsQB6iHPNQhcO5FJ
  7019. npunBk3gsrRWTaH3SVxA0TH8K5M6yt3PO-MW2v4qqdVkPqGoPSv0Tf1a6HGE-CNf178Va
  7020. nKGPHgqhmB2ymJA5XJRfj3KNpiy9pmE8Gxm8-CCNixWBNhK2pSKFQ4G8lCMWANYd+qupC
  7021. nP0IVhRsvdXeT3shj7XHPbE5BF87DCbW5HujxDhLfqtOrNdhBVoptOtfmVRdJ1I8Br+sF
  7022. n3czE1HpyKPKELGkz2BM-kGIrSvocLwWi8AEnh19lOGOGn2trey7ivo1tCKG1+aSNoyqF
  7023. nOq0bTBQ4g3JUPIBckps86djao77Eg8dAkNzzEpndwLVP6763blQj6Fp+79AQEbAjneka
  7024. nWkNLReaxG4WJqu1TUrHJ3vVyC6dC9ssqSvDWwQ9K565pEAoRJyIagbHz-faLC5LEuxh-
  7025. nsOsNMMfIsg0NqCyo5vHhZnP8PEUTprbl2epyx0Fgz05yXKsJOS9iJ9+bWfh3q0Dr0UfS
  7026. nY5Gnn6OaagP8PI8JmpLf2adfV6rJBJJ07XvVYZJreukUbA0iLg5TpMcHoaetykGiSl9I
  7027. n1xZxKhWhAq4G4NJ0etjoB18d4lSMqug6rfONX407EUwiahNSj3fTuuzrlHKjM+Ionn1M
  7028. n-6XLMJg5PUhRDayv1rOGfTkeIGaqaiAOQQTr0RbJS6zZCOH80j+Z7PKy0JwvRtR5reiT
  7029. n959aM9xOYBSL9xFtN8Um2d6zQlnRL8Il0v0BR09ejIqfLdyAT9rOphsiqMRpvWIR8fA4
  7030. nSmkfLbxvVtM8LBomKMw2Ec62Sx3mMQwe+LalhBn61HriTH69VJnOn0eT1rhAIYBWQWhR
  7031. nTekT9CGvoYDzLi-Rp2vgfoJc78tsKEXsvohqUGi5iYZ067sBHoEhbcmwj-AAsRg-MQkm
  7032. nwa4gOVXzUXjuPXGMTSlQvgr+x7ZL2uNizBEsz47QrLhd0SYlPlasgkPinATQXJR4Di45
  7033. nMgQgsHy0zgUbz6X7s1SAjwYNoswsDiH1+q0sc5HAQWEhZXheXCS4HRfU+Hl6tsM93cwM
  7034. ni159g4blG0cy5XDOk31paCIRT+E+gsmQB74Rowx2Uw154sMQMtNfht9H+wYvELbmVrmD
  7035. n8M0zXy1FcTC7jsnus9BVMASyBnMAUp1lpP20AS8TpLxvhU2NFuuOlWpQA5khsWwvRjvY
  7036. nVnmyWRc7FUfXiUrXgNlJioDIjhv0xoTHULRnzyD48tepPiGktg2kq1Va0MuTlqtBjRID
  7037. n-bN4ZYHS+SOIgtzUivPbsj3B1Tsy9OOUeq6QiW4KcrlFuDt09DGJWWhuv1KX2F1yUVT9
  7038. n-c71j1yVXUl1S6VyjarUSXX3AD2PgjG2O2Oz2iDwBmPS2+hk0iRlsYezaQkRsUSi3toP
  7039. nbDUbAEh3WFbyd62fdz5Yof6U0UnlsMztWIYl3uzkQa63DbFmcULh2xhEZyV25f29vF5f
  7040. nI9is5moFRm+fnef7E46OwKeVbLkijjVWyDbN6syP2h8pK1YQer3fKYlsPq9sLlBrlzXy
  7041. nLMkUMxX5XmyAx2pla04SutjWwL2Ox2oNI4nTJ-G84FmTbVszmcqrQQAFA1XytLGTKCPb
  7042. nb64DHch0nyqOMJ-lC+eHncjnsHjacER5BXoEyCfAaxRooyC4mEhF8PaHt-8Dzski5Jrn
  7043. nLTUAplyQs+xRbvESGRg7lZyMDWp0bp5QpwDP-52JyUV5y8ms2PgW7MciN-UL6i5jjgD5
  7044. n-F3BOTqrInbzqeDbmgzv8nIRxhwqQDuZae2knFd6Tc0n5Yj1GXEh5fDUMGkNlVBVMhIF
  7045. n8MuQyTvuXwm7bQYDo1v12Lv0A-nV-cjDjLn0zD79th3m21Nmq5jVG7cyyVfUIR8HS5EY
  7046. nvMFayHCq65UYvFLnQ+msNHpVBWGTABStLVRjKZwm4smja2TAVqxRWzuJsR-Z29UGC3xw
  7047. nyIljn8ojbvbptTMakxhnDlUQC5xezDVrkt4ckR35ETVN6Bek6c8bFYK+ekoDcj3Ucb-w
  7048. nzjFkl1+syVU66q9hv7jUT-q-xwWo3a9MGElPLuyvSNow6UmCHeO3Bl1vVTWfu5kUC6WJ
  7049. npmRac3ZxK5IlsI7mOb1UyaZgWV8nz4a-DkkCV6cj2iIaMH2aZDoOFJKSajX0SXVlz5ya
  7050. nldzxfhupBTTWk7w0rzG7SLuypcZpo7q0EowKPGX7JiXvF6nhiT9oG-msRQrkvgGbMceT
  7051. nemZzfyQrUMzX6sWzRLLrxeNUr1aIVFzH3cbHecJ6Pi3EUaV0mIC7MWmODPEEwwMBQK6e
  7052. nWXcJ5+lO9oFDfloA+jedOZWh5JAtW4xiBQV78yZ7UpGd+mtBKeIXjZ-OHIzaGqho30J6
  7053. nJHe8Hd8QCX7Od9IuWgaEpib6h2WepZ5gTR7u5QJZGVho39xMqeWXKJNdYsvAFJ8BXV9g
  7054. nIeqC2VR6RHeOTPxIfuAtgmKLXd9aGUouadgiBSdcrXldgsva7ohPR7FQ64rJoLpnd4ou
  7055. nKd+bBSbczjbGRVqZq8ERCYdBYLPeO44ih2h51uF8YcvGMeHRCYeT7R1o0Ghc-E+9bo3F
  7056. nFjMWWVN3NJ8I4PqMcgJ48oJKIlN3KRbN34L5tJ0I2vy2cWKliFHZaaoIqMfn8AePZIxF
  7057. nTYY-FEKZVFEJlhgdgjB33-INWWYeXWeVe0GuZ87Gsp88ZgMgcqWNOHZ3mqBLI9EWfcmW
  7058. ngelmWgenF6f2sUe88gkCWVkZ1p9oM0aHroc1ZFycH8Dm+ug8eTn+ubkeDv-4e47eHe9m
  7059. n+os9ZFxMao5Z-xMhcj61pTRFyM5paJFyMABW8XykoIfZ-nMJITa-4XiJ5uVRECI5uiub
  7060. nwUDpgubwU4giZFxcG8Tm+srneDn+taEeDv0ZUAcDP7p1tESqtJ5tUOPtJ5tUisr81yl6
  7061. ncT61CrCdzA0iJ0cz6AJEyM5RgluWu82QG-3AOuOciP03cdPwJcdO-NYWCOaBcXN9CoLh
  7062.  
  7063. Chapter 45: Alternative decoder to using DOS DEBUG
  7064. ==================================================
  7065.  
  7066. Here is the latest version of XXDEBUG, this can be decoded by using DOS
  7067. DEBUG or using a earlier version of XXDEBUG 0.02 or higher.
  7068.  
  7069. This version can is now fully backwards compatible with all of the XXBUG
  7070. formats, meaning the original (pre 2.0) format, the XXBUG20 format, and
  7071. XXBUG30 format plus all of the others like XX3401, uuencode, xxencode,
  7072. and UUBUG.  Bringing the total handle to 7 formats.
  7073.  
  7074.                                 XXDEBUG
  7075.                      Version 1.10 Release 01/02/95
  7076.                      Copyright 1994 by Chad Wagner
  7077.                        May be freely distributed.
  7078.  
  7079.  
  7080. DISCLAIMER
  7081.  
  7082.   There is no warranty of any kind, either express or implied, covering
  7083.   this software or any associated materials.  This software and all
  7084.   associated materials are provided as is, use them at your own risk.
  7085.   The copyright holder is in no way responsible or liable for any losses or
  7086.   damages of any kind that may result from the use of this software or any
  7087.   associated materials, or from inability to use them.
  7088.  
  7089.  
  7090.   All brand or product names mentioned in this documentation or any
  7091.   associated files are trademarks or registered trademarks of their
  7092.   respective owners.  All products mentioned are copyrighted by their
  7093.   respective owners.
  7094.  
  7095.  
  7096. DISCLAIMER
  7097.  
  7098.   There is no warranty of any kind, either express or implied, covering
  7099.   this software or any associated materials.  This software and all
  7100.   associated materials are provided as is, use them at your own risk.
  7101.   The copyright holder is in no way responsible or liable for any losses or
  7102.   damages of any kind that may result from the use of this software or any
  7103.   associated materials, or from inability to use them.
  7104.  
  7105.  
  7106.   All brand or product names mentioned in this documentation or any
  7107.   associated files are trademarks or registered trademarks of their
  7108.   respective owners.  All products mentioned are copyrighted by their
  7109.   respective owners.
  7110.  
  7111.  
  7112. WHAT IS XXDEBUG?
  7113.      XXDEBUG is a decoding program that can handle 7 different types of
  7114. encoded files.  It allows users who don't have access to DOS DEBUG decode
  7115. the encoded files that are often sent via e-mail.  It also gives the user
  7116. a little more security than the regular decoding routines for XXBUG, it
  7117. checks the file size and CRC-32 to verify they match with the header, and
  7118. updates the date stamp in the MS-DOS directory.
  7119.  
  7120.      XXDEBUG supports XXBUG, XXBUG20, XXBUG30, UUBUG, standard xxencode,
  7121. standard uuencode and XX34E.  You may have to clean up the scripts, XXBUG
  7122. and UUBUG files should be able to be decoded as long as the MP option was
  7123. used.  But all of the others use different types and methods of breaking
  7124. blocks of encoded data.
  7125.  
  7126.  
  7127. HOW DO I USE IT?
  7128.      XXDEBUG is a fairly easy program with an easy to use command line
  7129. interface to the user.  All that is needed is the name of the script that
  7130. you wish to decode, and optionally a filename to write to.  The first
  7131. parameter is the script filename ("infile") and the second (optional)
  7132. parameter is the write filename ("outfile"):
  7133.  
  7134. XXDEBUG infile [outfile]
  7135.  
  7136. So if you want to decode a script called TEST.SCR then this is what you
  7137. would do:
  7138.  
  7139. XXDEBUG TEST.SCR
  7140.  
  7141. and XXDEBUG would handle the rest.  What if you don't want to call it the
  7142. name that is in the script, let's say you want to call it TEST.BIN:
  7143.  
  7144. XXDEBUG TEST.SCR TEST.BIN
  7145.  
  7146. and that's all there is to it.
  7147.  
  7148.  
  7149. ERRORLEVEL CODES
  7150.  
  7151.      0  no error encountered
  7152.      1  displayed help screen
  7153.      2  could not open infile
  7154.      3  no begin line found
  7155.      4  outfile already exists
  7156.      5  could not open outfile
  7157.      6  no end line
  7158.      7  could not update date stamp
  7159.      8  bad crc-32 checksum
  7160.      9  bad file size
  7161.  
  7162. Error codes 6-7 will create a usable program, these are simply warnings,
  7163. but error codes 2-5 and 8-9 are fatal errors, which will not produce a
  7164. valid outfile.
  7165.  
  7166.  
  7167. COMMENTS, GRIPES, BUG REPORTS, etc.
  7168.      You can e-mail any comments you have to me, I have access to Internet
  7169. as well as Fidonet.
  7170.  
  7171.   Internet -> cmwagner@gate.net
  7172.    Fidonet -> Chad Wagner via 1:369/120
  7173.  
  7174.  
  7175.    -------------------------->CUT HERE<-----------------------------
  7176.  NXXDBG110.ZIP
  7177.  E100 FC BB 03 00 BF D4 01 BE CC 01 33 C9 AD 86 CC AA FE C0 E2 FB 4B
  7178.  E115 75 F5 B9 FF FD BA 20 02 52 B4 3F CD 21 5F 72 60 8B F7 50 8B C8
  7179.  E12A B0 2A F2 AE 75 55 B0 0D F2 AE 87 F7 BB 00 01 B2 04 AC 3C 2A 72
  7180.  E13F 62 74 46 57 BF D2 01 B9 40 00 8A E1 F2 AE 5F 75 35 FE C1 2A E1
  7181.  E154 88 27 43 FE CA 75 E0 56 BE 00 01 AD 86 C4 8B D0 AD 86 C4 5E B1
  7182.  E169 02 D2 E0 D3 E0 D2 E2 D3 EA D0 E1 D1 EA D1 D8 E2 FA 86 C2 AA 8A
  7183.  E17E C4 AA 8A C2 AA EB B1 BF 20 02 58 33 D2 F7 D8 13 D2 F7 DA 33 DB
  7184.  E193 8B CA 8B D0 B8 01 42 CD 21 8B 0E CA 01 CC AC 3C 0A 75 FB AC 57
  7185.  E1A8 BF D2 01 B9 40 00 8A E1 F2 AE 5F 75 D0 FE C1 2A E1 86 E0 32 E4
  7186.  E1BD 8B 1E CA 01 03 D8 89 1E CA 01 E9 6C FF 00 00 30 0A 41 1A 61 1A
  7187.  E1D2 2B 2D
  7188.  G=100
  7189.  W220
  7190.  Q GXDPlus 1.0
  7191. *XXBUG300000338A02011995B6046382011000------------------XXDBG110.ZIP
  7192. nI2g1--E++U+6+2+76Vu3wpQZfmU++Dsd+++9++++K3V2FI7JFmt3K2JBKaRI2piobjE8
  7193. n0M9M6FPo8c7UkE680+PPFP0+q23FEFG3F0k6sIO3N+FvjJsJjFOwe60UkI89Ue+W+OGr
  7194. n+4f0U0Z+AWGHb7TruvpNuwjNAqhapemQjTQtyxjTbpjAiB2E-C4VNHU+5V223hgOGgBD
  7195. nh6lfhmlq-y-B0RtJN9w+byzqRH9gWUQ+UVpaElYh1mt+twUNYAV-vGX4L-x-WeKs1wjG
  7196. nn80r+ase-AaMxbZDiBzoFI-Csig2LkLuNd5pXo6QM2BpDI6dJRW1TXtbHdOqCDT-mwno
  7197. n3+1Vsmb38s3FB3VFncnvUv+ACCfcQJBmWLKe+2xJr1UVuz+jW2QNuMDspZHEk2MG89+7
  7198. n6GURiozXs2t0GxuRszTZ90UnnfYdcmFzRGXkrfmnvdQVclPyNNlLsdd-xg9wWvgNVEyR
  7199. njq41HpDJyR1LwStLjZdTUo1ej+37AHuXeEW0WdZ97rjpETICxQ1X9DF-XNr4zidTUbAx
  7200. n9mwbzw934FewUlGYDUan4dBJGudBxdCfHxCkgpUOHNeeIgEx965JVGsnEH7FI+xlip4L
  7201. nVokSfL+Qx+Np53-wVC1yz9JW9jugsyN0uxxQG3Y8CS-90VNc3ZSQyyNCtY2Gsi1FkKCx
  7202. nMkR7UmQ42kIFUzA4YkM384gEQXdLZR5mNVii-xTj85rjxB4yS17yO7UsL-fEBIkOZUtH
  7203. nVwX15yjm+El+6xnVqQan2rU15brFDZm05712FfVC80IX0gx45igi-qtlcBnqVgcd+DXB
  7204. ntZ4aUtpsFyHXG0WnMeHcjQxPT9tTgPHEkKiXTYXF-mG2N9F3Aq846-moOJl8TkmCtFoG
  7205. nKg33pTPdNuyMUmO0l1xlELF3ctAkWEXYy3CX7SR7EN8bh0zXKIP5g117DxdBX1-s-lYY
  7206. nsAxejgI-HOSXsUbNqXh6WsahhH188C3D68XJtPz8qZVgOy25giGknhtOLefQFimyTpal
  7207. nBLYzDImz+gy-S1Qf4oojSxq8hzriZJ1KnYQZDlvKtHiKdPtzl0Acvo0z6TSjjspOtQtO
  7208. nZY+bsdcF+eWdACslxqbskkVBZuAj9k8-+tU9HzI1szqWf8kU-y-yTLvVJz7NEjwvTGFj
  7209. nYHYfvv1hrkyu4G7vlttSFjZNWPYZLpYGI16uv24zOYUpZdibSe4uruQe4HiYmZ5RQTmd
  7210. nEVX8al57V7Kz9kmgB4AC8wp0uBhriidPtLfI8b6M51KvMlSUREviipPUbY1i5vSEepxL
  7211. n3zksHDPwVlF1COMtFydzqHzXa4bcr1VJfgfy49FP3OBueW6BgJOsMIcAfyn4Gqf8grQD
  7212. nvnPjr+qipLXgOzZDFnxVIdsUAhPwLOxZpygSyMyeJnDSRMwz9p3SgOgTYUuy6UVJEhKq
  7213. n6NhvSQBlZf5wW1UPhGfucPP7zXbtR9MWO4rEr80a+KcE3aFyAGb6z1I6NKkVzXYd86FE
  7214. nczY2iRxwW1-iej5ZOICe1uf7S6ChGeIO8Vyf8ZAdJPxHoWpzF-n8T2Bmuse6EyYhjySM
  7215. nwb6iJXfA+NaGQx2CQhI3pEah5Dac5YLH1HuC4cv28RTUld2C9OGAArqOCAtwMFn8W7ws
  7216. n1gBDK7Xq34JampymMxKAci1aoog6kGOT5Rc39RdFkRUCjJkJezpYyT0wCGKRTRalkqwV
  7217. nNGOvyRLY2CgEgoA6GDr7WEgivzhKppnUqDT6xAfjpEEz1+S-cukWPOX0aOddOUs8ZEFt
  7218. njegm9uLaMpsJbqTVY4Y96rfYMgeB5dBjOGwHzzJxoityamtOjTFrxZJ44n9aCId58-5a
  7219. nRDACstdaMH6FshbDO0PkqJuhAvL5aWAbz8i1rH05-v8SsIhaEVCEzfZEMXRSgML-PJaK
  7220. n5wnybYJnP3MzQqmSS3ghwTqpghJ6Ut8OArI9m42VWUpBesqGo0xazVQHIjgpswiK9uO8
  7221. n9vYO-QuByQLr3Otd8KuVMRtcmMYCowDmRRq89V7vJpWLqTUcZiWcTeElW26kOtA-GAgx
  7222. npi0kJPV5q7Jpwg+gyZCaQ3a9YXTqAKu2k9AN6TAI2wkXZ05BkZfiI71MbyXaQ8AqlzMQ
  7223. n+5knuDgPmilbi9mXC0J1Ufpu+50m9WdLTuyDYEwtgO0IjS0lnh4QGuffcb3pxt1ygMCC
  7224. nfPdqrHzwoaC9vb5uH2BxEzRIsX2OvscVFvE0Kw9izxpi5ePQBzBW4sSDcXHmi8DM8AY5
  7225. njCblIY4vQYwZ-I9u1GPEXpriBqQe491xHsMb3yCHjhJtVVVsYuoGlswE7saHPRJ1gubJ
  7226. nBxxd7dyhdZPrJbRL+qTm4VmTv4az0gSPwkLn9rGBzN7YrHmYdT09HDvxc0Wo08B-6MeH
  7227. nl1-kp+x33Q2Xg+e-RivE+zX5RibfIa5zld-m9c08B4tSX+NA22Ud7o8MhncE2mNV25wE
  7228. nxZW-CohFy0X4tDXAoYDSJhMrB51HtfHIgIieao1DjoEzV7gxytVs1gYTqGEiJQPUw2LF
  7229. nUPh7z2Y2JLiNNCSSVZhX4n-GwPNt7Icz558AACFCQ1TbK3JHOrRLazNLcrGP+ehe9VVg
  7230. nAoKraTnPIDf+eNW+8Rq1z+YGKhiFBVDbpp59lIfckAYT7h6D2oCw07igeoYn8Vx0UeHh
  7231. nmE+G84x1pxHA4inha90JAULJqznafPtDlAJUH4eu0HigkQ5KetNw+g0qlRCVZl2r8c5g
  7232. nORrBC2drcqMObQazaYliLTb1BjPpfq5cc1cY6zjyYDW-tgNilnOIzOnBfem5586MquLW
  7233. nVEb9WQ71403FanlaqIzZQTAgBOoX32sWkhYj4gGYNmXRjmx6j+6rUB8HgnGNu-N4XGX2
  7234. nf21Nrz2dbaIc+nJzllGcJGvtijEvkL7Hgq2zpS7MWJBUccy6m0UtlM8roM5QoNwykNl4
  7235. nmMQESYVmX0t6IIIC0qj0Bu4XA9zK7c+prKz007MnElBU1lWOHXFBIR0NuC+wSKl7Y4ZS
  7236. nPR1uI2JeV77urRd30Q+4aL26UiG5XHcXAZQsV-C4B63VC+Ejkr8dWiU7w+uUliNpdDE+
  7237. nGBNXVgxj-tYsyCtKr9maSJKWLm6KOqQiOOK6l2xYkhhHmjUfyAR6hnRiCKNR8FhcSTOa
  7238. nAUzHpyfD98bGDesoc2PN2NGC2dQTCR7iWCumKgAZIfrTkzpgUNQJXsuZ4iYwYdWMFUfU
  7239. n1dyz1z4FQZ7x+tNzrGmI8weMaqfDsN5lSWtt7sO5S4FxSMmAWB+em7DFGx-LGTRbH9VA
  7240. ncARFCLnG9XZW0ngAmGZC3oKdQIl+5bH1OVtXw3C49d2Yp8SOvF7d0yfCKWAgi8BSGeV6
  7241. nfP636Mfcx3ffr5e2zUM1pwDRraTeUHJK92SqIzTzAFXaOhMKgp6f3zCgSHhq0FCTGrBs
  7242. n1g9tdlWjEm4piPCgPvLS5nyqYU7sJ+LfPT02A25WM09XRjp-I+d3N3P6BqfwmxpC4rx0
  7243. ntPx+MMqSKKBfoj8MWZarNAZqoCeknjsOINQCidiqm3N-kW25cD8zO0SErKQougGN3uUE
  7244. nruyQF9e9EMjxuLnv7pd+VTqdOfI6FFMUwrFY+Z3Bw2a0WQsJ6i8nJhkjrDTNUqKS3Mw+
  7245. n8kz0wmYdOz3g09bp-Vl6AVaoDA8NKm888-EjB5+GEANavH5wdS4pOoTfBzThJnfSL6SE
  7246. nKve7LD-Ka4GawqO+E59GZ8g8SmL19XncHQvLCUDBAqRt4LDENd3gqooyvyY59Q3FQpxp
  7247. n4MmxJak53MZdm0Ui6GatWFeWy4cCWmkIZfDVWbLCgtRdTjYeep-a75LSdyt2xCCwGfW1
  7248. nSp7QslKbxyBHWr2bzY6s+YD0nC8lpjY6JFTChr6buaXpUZtwvl9gN8mMKADpQiNNeRI0
  7249. n6rye3mzG8s6D0GPI1ztGQrv+HVWkKaKjgJNLsUdXTj1sN2R-mXT6-r2Mzata1EgEJeOK
  7250. nvUGJA31QvtcgnPiIGdygr9AHiaaxMqxfjMr2JO9-1UdQie8AL0AKxVDb8Dh8eHlBlrwj
  7251. nKdm-W7OaD8GOS8DjpBEbRSO5AcKzpFlBqgtQTm8xt7HJrroWlBSvJQcSSgRMroQOds5k
  7252. n2ZAEdyyAD3i7auyN8Ey0tG48chbRPNFVcebpOFXmsJ-zSNkd73rXV8EdvuNTommhcgSd
  7253. npSpOz6vlnOgEFGAsyx6GoZbHJitRsDBXkM8yAphvKBzjMa2RNhgCgrlNTRNnai9W4tH4
  7254. n3bC7x7CnjfIp8AoBa+FjRqFVQQh+CjRfMMlBtQwRq6gZrh+d8Vl+7Z-w5CH3aWkBtSOw
  7255. nAiSmzQqThDe+jlzVTO1JwXYzYyZp65IGEZg5RkewuLmQvw8lxk7HpG7Jk6v7jp5aTirq
  7256. nAbmoxbO9vyPxlrlTO1LRepTFQLmq2SmK7maOXs8PAvbYQG5IZ1rCxz+vnLhuIbgqaUsK
  7257. nnBSEMsSwDaJFgvfMxirIES8nmMqM7iYdNZyNpa7pnzsoyltCPOB4BUFRdZr49UT7w9Lw
  7258. n+DfjKgrbF9-kMTQeQ0JKw2YjiILvc2rTyg12aQSCp73VsYeFu87aVqKD-sKppDsoxRzD
  7259. nCqn3H+4b3WvtjCn9DSDVUHE8ftIrGP-gYAuXh8GDKD4bOHmBDJemxlpbNG4Yn6KO9o1w
  7260. nykRfwGBLqfdtTPVbRTvbFdlsQsaJSCHEYEdigvvdCXder5KIKJpfy9Ov4fi8zDa1vxXc
  7261. ncrVySym5C+YuecBhpmDzuuDRTELKe10VUVC8flIwpYUxBJ97-SRQgjAVgtvsJLhNNSvH
  7262. nOFkcPSGTcWFn71MR4Jzoc4253L0dPmwddDIBw6n-HPbu4P7x9Nr8DdpKalCyykEtQf2V
  7263. nzczhRHUHONvdGqWXQWQKihBHTfUW5bahT3N673EA78FbtdTG5qeQzQYWcf5juwXZBNyk
  7264. n8txwclHxomydLSeuQ6ZoV7y1oWUt7ezCt9o+qLv83z5MIzHeXDrtcEq9n3irjqLx+IfO
  7265. nrxOOTCtA-wuM395DF4YBSBznaKO8zAFrOTCx17dlMQxWGd8Mb19x5+qM2Zj7YeKuYopA
  7266. nWLWkp8AxWrfjHc4UaZ7hjZoBR5qxpLhZpSNx4UKlif60PcSGu9SOyQnkjCEDfRMPYcwa
  7267. n66x4Af2jupDAfCKTyRE8wi0fBsW-0G3At1GoulcmW-nFqWksoRVbwyuK59gvfcESPFjq
  7268. nrwCdwg5PgZaZNuKWGHrdXUuwdElkRD5fonHGi8sURFTTDfH2PeaQBC5LLuGyhli11wcp
  7269. nt8WhpNwGmFZDyLheeM4mvOxBlRliCqNLfe4IIDsoZtKe1agKItNIw0RI67G4zk6v0kRe
  7270. nI9dfWnSUTAkgevjrv3ZPF7R7rQ8urouRpLodG0JxZaKA1HAOwf6UdCr8C03lWP9jjb00
  7271. n0zJ4pWStsbRtV2hArVzn+PzeMBIzmELBpBCH9RJXUHpqBSM7db-xJ4VhUvtuM5L86NCe
  7272. nJwvgFDH5AHmTDPzvggxHUv3UGgsxm7B5KdHbbzjT3gqmXVEpPIH9kXoxr2YZ33YxTwLw
  7273. nLWUdrGzTFZyJ2brfGRVFnQ13VwymjYe6xsJRLZov8fSLTLhll9R-i0mT8OtxdGFQlN4d
  7274. nENdAYxzhgtI9NJddqD0MziwJeGYb3TpWmD2dpKTdtzWNrPIvpY06FhOXTtkpdrHIpDer
  7275. nKwzQNlbYmdRm9CJlKdNdZBNbnBGm-H7YIv9c98gL-Gcl7MpfZ7O4wsbnfPXWMKaiB1bx
  7276. nvB52-iSO36A+GbFTAYA54xOvfgZOaZONinfLpf6zCTBNozPAyRZGl8R0DEAiCrnrfTYX
  7277. nLDPxuDHprSKehyGrZhHpRbQH5WYg6eWR8mvZZSacbz95nUDzt95zmGS3u0Y8vJ+MjHF+
  7278. n0CkGYPNhXdr3l7AjCp1Omi4kRMuYRUPUxrT46YMIbASQGqsKoe5LI94E0d932vYu56uD
  7279. njcQUUR4NFuPO43r68zfAE9wskJK+iALBpAg7oZ2BZBAw--apcZ9X5LAxJOPjjbGxnpPK
  7280. nO07Vc13SzaQWFRyWPl8qEAz-xg+bx3GkwhxXhydHyW0wNpaX6Nvms-OOZzQrBSxK-kUV
  7281. n2qewmPr0FNdDX3cyCuII0uu7crhyWGSb8fyVf1t8tfyKm9etDYXlKUDIOZAUBRxDn0Iz
  7282. n7ruRn-eA6pl2W1rKy-zt2HP912e2aLG55xfNfQOB8LybcAIKf7J+zZwklz59R4I0zc9y
  7283. ntOimN381qjKQ-1xc4bWr7GmCbHdChflrZ8TqxTAsKU7dtt4sigdPa-UrRkXIJ1yoVTrl
  7284. nHV-VeMazHZBUi1vccjKgzzbbw1eBLgcX8BXNbnPltbmxkRXOaOJyY32dGu68xy+vzuZX
  7285. n13zWKnxBBZhlX97boKSdf1T0BuKf9bz9cTrnqO2Iwept6e5ZTghB3frdDyDwXe9wGpXf
  7286. nd5b3lj3cfHYG2l9vEmPsxc5tPVB6y5jIttz6VsraWK0axADAwfotQAVAXUOvOVsPMEfu
  7287. nya6Hmbm6D-+gyq8pzyq44WEfRxMx3IL8zpnrDEG2PEmJE+xeZqUNdMpPFJOWHLxJrhDC
  7288. nUbNC4D6bO9pd8P7+CVl0PG9LnJ0fml-motPROMnFEYSnSLAGcGXod+SR6HvBB7gNEH92
  7289. n-WvLBkqbH6KGTpF+EKE3jTgGwRlvuvR1TPwjCEbmgDhBxDnZ5gg3czw9D7-03YkZGJ93
  7290. ntw1BjkSaV6G4uo2GrM4mg3Fcb7OkKK12lqqEbsStvc5KXAdHBU7ULgxXZ7BQ+jHBqT7a
  7291. n8DpcFn9OkvfcL8gTj4V8gyDqq-dcW2Mvb8INHUxIUst4EXIK80PCdgQHWM0m-05UiQGb
  7292. nrOcQuCbh5-OTyc4txCwY8dqDTmvw7Xxca3QvjwJvMsiAacA9mUbTiiDynz7OEiXvCjfP
  7293. nbzszINgPaFTc9vwJhneqMhyHCSTglbqAAKdYGankMHnirzTDGy2RDsXtLfquEtf1NipL
  7294. nuPoeXLCZIvvDnyj1skr0yt90MwSVoQnJJy+4FYxl1OnxXSCRm-mWHyMKjrKid4M7Q5n8
  7295. nheZHnD-LfR3uFM7TFRJATMRUQLffOLNTeJcxIyDOL8S6-Wibb99hiRw4gcWweEZP3Aoa
  7296. ntEAcJC5KKJu6X84P3PuBq5xfcdJdqog1GvxQIdnSZHZpcn7lErvBmSVQJPDODHPWS2cp
  7297. nl5YiO0Deb+-YfknOsIZirqkOY0DobzUMhmyOYwSHLj9gFDcMurOTiQO8Pd1MR4NG2y36
  7298. nAwGydgJ9YpCukOIOi3DK6vdSFHSR11iFaNe1UkD7yh6zAiYtS8cF7O9s53sIAJShtZfe
  7299. nbx9wdSaOwLUfjz93uy96oOVJV6XDNnIf0jbO5lUhBZJvxoCQpPAJWVfadR7nWlPT9Hzv
  7300. nNYiq9vI-NH3i8zy9UAcCLKmkIMtoR+6gqqgwnyJ63CZdxl+mgJihj2rSM7DCBJZvCjki
  7301. nq2f-lCebbgPXIHR55WCQHbrnV78UsDNP5NTkSNRunlzNuamw1jFWjrmiA8q9BgQCyvYV
  7302. nKH4rOcf+G1gumXVfPFJZgcK3BQvsnJXG52x78D1rFpwjJasRcSloKrqYkB-hLiBi3wsC
  7303. n6Ncn2zTTi8lf9tM8+cw9eQJZDNR-61BlWrTEkSAI9lSyjPZ0jTdwwZSIiQ-NVkyYxzkd
  7304. n57Y4t+x8Fz-lAvrQy+ToP5sxq0CP8oBdLgRskJuPSLxiNm9lypwWd85zSc9uKBrvkxML
  7305. nSdMe5oD88p1BljSxx7fAeSxJvp2OYxp5vN2EiHoGjggUty8Mjms1c-UqLsv9iMPEfybr
  7306. noUZeqkq91TnNtKj9IJf9Bmyo7PsRaRL89erGRsBuUhuqxDec-bt+DOQShKt05hErv2MN
  7307. nQCApynKe6bUGZaEBUb4HID3AUqUGMcPh0qJjE18S0kHpBaIukqFePdCLDZG0YnuMQx28
  7308. nrhFbXJyYKRrhcJZhsBG5V-fJTmQFQtGBQog8wvLDomwawo5hg3vaD78eHqOgqQ91zvh8
  7309. ndYlhjLHUYEtwKdmmMzNK5WpvWNErPYc7nxr-tdbSFYxRobDbCHOZZuyum2rrbre8GdfP
  7310. nZbtMTxto8zh0wi0Q7XefclnPOSewe8xNiQ3QVh9mtD0bbYas5FOSjhqt4TvQfoF-vC+X
  7311. ngHwEPkRnSwLMxZFbuEhHjizmRmHHid2yYsqsb3gd9ehbbyrGarJ4scINRXsnbafzjOPB
  7312. nfC-aHDcRrBQTNCkfiwYBdLLkfUOjqWbpc+E1PrBUTx8Q1Q5fmSZbcs2nmgwp-4q-EyXP
  7313. nPpLW5Ar340vdRrdF1qJ9q3MdSPs-4lMZSNJcmBboMZ104yLZl9BtMIfyfQU4WB8vL6YE
  7314. nF2TJqPxyTJQBn8gI-KebfIc959vnXwt1WLAPmds6py+2swCBik06hlLTDQUE4gQQhN10
  7315. n-3YDQ5E3XuzDI3sV02lE+WcAp5n+6HL1+wBsN+Vw5CsK7+ovwkVd6QC6Rp8-Q8yt2m5q
  7316. nQUd6mCAZ2vhLuvaB25xaefuTKW0xf3l3C8HlU3ad704LWCz2lsyOS0bwyA9XCTXA+b2g
  7317. nK7Gc7D6P-rLaXwc6UzRUT3I-IPYNL7fhRWB7LNokfU0Tqi+XftRpVLQ3I7MEmb+edMRp
  7318. nPgKRLZqjt9lX9wfE8QS1iqnZTd-m4cmwC-8aIas1fuY6LSDxaculLmfl9SLQMKXW2YzX
  7319. nj3eXMHi4g2gIrLo4L7w8iwYs4l+UMZGubUsaeOajFqgIuIZjknFnndivAtq3GPfFVvG-
  7320. nOAxssKgk+bWXfwWQmAS7SKs6Dcw1BC6m-RDQDO7QOnt0LByN5-EeffUFB5L7-gJljHo3
  7321. n1Y3bf8VB7WUpY-9XbGuvTDyBGCuoY15NnoyoBnmDwt8x-nonFZChG19ZmC2ZHx2h0fv7
  7322. nswBWHLckBAKM5jUaLTsB-9zkZ0LXMNa3cryt2C08VRfDr9ax5W7GZNx1w8ac9j+rrudt
  7323. neS3lgkC3+F04lsR-PslsfcFFkGQB3CxZ81kQLIqSUPeXVB2utBE5M2XKpiIG0gZEO51u
  7324. nXfQPpVxUBJRCBOOAO97y3R6YpAAlsF69WqiUbjPYmBE74Bmg4PgCNRE0Y4GXOAOa0tOu
  7325. nw54fb4J7V7oKJZIftUsvx02wdj0EiJ2vppo9fNiSFZ8wk7P8AnETpHjEJPGfGkpwKn59
  7326. nPuxFUAJu0NBOYiK5WyEp219Vxn2SGJ7VrAmr2KdwpekdJ-fldrcUW-0crRnDFAV+ZgBF
  7327. nvATKS1MbukOggZEsFcuP6dFMOJE2rp7vWwBbC3QthokL2vrO91mA3wRBtgmbHAxKnAIQ
  7328. n5JShGOrecRHAk9d5K+v1ctmP3MRy2VHXnKDvp6nK7-fwyHPllTNqdHxKfYbLAx9p0CLw
  7329. nA1-O3wvWxVCsjuS9G4bxZ6++STboWcaEYYGJewYellkbVQE6mTac68Yzu7HpxtgjXFFe
  7330. nrkuZwhMuoJbkyqcqxSjIieYConeafUJUKgWo8xDybbNj4aJOtPH5ozs1RuSxa9P0GSBo
  7331. npOb+mLb4jdojn0BHkRHWFtzSIbaqiiBjyFSCoSwCKNLaynWJA3XDUop3vAr+r3svSqWv
  7332. nR8jpViSZwKmsdQuGRyjuRAq0IbNR1oDuKO-YEud99zgzIun7ALIClNoTXt6z7B4lnWfP
  7333. nmg3z5IImhPde3NXSnK0T7xSm+ECfllcMfiQQpUDkVwWXWG3Opg9+AWlBm08-dGothrRu
  7334. nhgytXuYBZq4DB6VfZbBb8EL99Y02C7hCAOGLkiPQN53hnm4-7Xag3+00pAT7141A4MrP
  7335. n-jwWCp7ESofkecmCdlbheE-cIthV8JnXdlU57J1WT-EpGOB4FgNee7qtF0wOLx3oeULd
  7336. n1MpSzZGgkTaRvP6I5mAxcvBLnNv0Ml4bS0KXqzUIURQIDZv3o2aJreNFnK428hSAREvJ
  7337. n11y039H0ErPCGBlDy6T6hEOwNzFMWst0kcxsXqKO9UBjby1l2F2LYWrV967U1j-UMORH
  7338. n8NZZ1zu0Afwy8rhkSY-HCu+-M01fjqqUYml2W54KZPm1kGAdZewtQUdJ2D95GFQvh8aa
  7339. nkUZsPmwR2QQXWnnY0ATHkrmyrkfiI4m2s+1w+mdiMD1AUnv+4bfElRWUO3RhZE9KKD0m
  7340. nOSk5aDU2lqSRUUWIsm7jUZ2oJQNQR4xiaFMaMMuxD7kIFs5p-9JcatbxclBC7ZjuXRCL
  7341. nQIdSTG1KaV6dJ98oUenR7Cq0NcusFP5V+HObrfGxhosowKmfJCGU2CrIZUngP51r5xem
  7342. njX6g9Ybe2OdNGcLW0R8KNP3E1wdnVCgMfQje3ZCYfDXlw-TD3jukMaze+SNYVRUsIH5l
  7343. nMSuqIZiEObSYb9dsMPlGQE0+LIWsZ2HwfQJ3-mYaCKlpaWFBTrDVYc8ZrTmfxHtfkzTU
  7344. nsMWPD1is0E659a6RXAoy6cfkg6yI87JizJ1GkatizxqAqHRb5a7qW+9kXOXJtgONmODH
  7345. n-kY9MHA-bN5mIzB7onLtQ2yt3Csj1ducTXwOP7KCQrEsZIX-HcovOcONLG307KbdP3Cr
  7346. nLuNWafZXVnYZ2pBx9FCKIHpZ0EhUqGEh5xfBiit8Y0PAHIEH2+TMS2io5SxgpBTA55BA
  7347. nclIZsdS9Fgwfv3GkBmrAOcv7ogndWPfsqj376KxVWQOZKUanJg2ppi+VGRVxoo0B7vmV
  7348. nEekQnucsNc9e8o8pZhN4XRKg+rAEeqiFrjZaV9l-QQ5YhDJtZ9H0a8mUsSSDBf+rzX4+
  7349. noXPmst9FW3WCbvAnlwIESzVs5+-FyzPnCCu93vhlZgT4lMET+gZvC8gCwK7QcI-yH+nb
  7350. nQ4kI8VyAXCC2lwQr5HecRckQh89vFlqBqVD7kIzgWujFyYMQse6X-wCzOzP3VFwQiskX
  7351. nCzUtb-QJSoXFpHrMFETcy58aKMomb+3kQLCTCqzy+cy3WlPv9jTnLk2+Bq1ZehJfpjsN
  7352. ni0scSDq4XNiGeG4VawCqV2TgDfvLoPkw8jd+nA4HVsz2lTDs+-lBC5Pw-9FfwdGdotma
  7353. nnzVXNaTl9CTN9etnQZ5O2YyjdQiwTHfjDIL5PRqqTQTCMdElizGnmEFyM2yqafOGxd-W
  7354. nG1nG0N8EJ+N23-astYN7a-pizTgB+A4oayAy58GQ5scyjC1VPiI1+8viiHArfRLuLobP
  7355. nQETZxuso+7dffnijTIJvbtWPF54Fz9c6k8HW0rjMfmRdCHbF8swI1bM+s3hoyZFxmrWY
  7356. nhzpUQ25xI+I+Nye26HRWP2iS5BVnMWH0p+x+NOFsrHOQLLAASTTidGn1A+-KpDFDb2CS
  7357. nCxVFOrhxRrqrnAWFTTRZjEGjU5fW4hANepe9VlTE5leS30m6iN4rj85mPOgD+0DjgbhW
  7358. naiPmhrKiy4PJo-M4k39NTxZinRCLE-r-Ui14HzM+VBQI3knZHtvusKL6nOhjjf2+SDVS
  7359. nQYS0zsCOFheNpwkgbkO+Yd4PaVUvlqPhzgrzHEcjLKeNcvqj9jWq5GITOQKxsxHSa+I+
  7360. nyvh8R0PrW4D-8z91ri8vwk0cZmXiJp8CnFy-K-ZDOBT4+b11KjvK8XfNNSZ-ujKMDFQh
  7361. nMd7hirwC-Fws2-2SAv579T7Ac0J3FqU5fd7XHXv2HGURcjsJ0g+5pb-tQotYYD9pe1t7
  7362. n2Nk6E3cVpXadDK8JGwjckQGuQt2+f8orPUvDyvAui4+71rfrc-j6rRvKynvgLBpshSbC
  7363. n-lY+zle54ieWZJ3yKDCVyRmoTE+wet5gOcZr6Tfza2GMhrAh5M0bZMZKvJt5G23DTT2n
  7364. nq4k4+2JbCQl8ds9xcGzDl57cxLg-89nP4pthDR8lsoNZwwkdBqc+mAZzoZUlNib9g-Gf
  7365. nT3TDPSw-SDogtYo7FmUNSDKmy-OnytJZ5PZJawhP5D0xvoJ0vHyXdvTe+J3crtOPiPjb
  7366. nhCSS8wiW1pc-w4F9x+b4ByjSTk1hwcnbYCJvQixEHjZTNeZf5p-Hxqhl1U0MmwVFqoAX
  7367. nx7zrFEeCSAGA+y+LyQ0VclDenJrCRO6h7pfM+5lNrPsjhfBkN2FJZC3Lx5cA+BwnQbMd
  7368. n5XEo73qKNLscOpc2k5dhtnfBjfSmTO5j5fKH0vk-KCCFhv93qOddvEHu0xpeUcQZMNsU
  7369. nyYdJincrRStvcgcsN35t50y8sdtv4Tttj51jiripgIs+S5HjLrwpUTa32A-sKqWDbk9+
  7370. nbCaYHIKSPnvykLWTRqZ9jWKQWR2jhno4XKLirqc8s1jBgmp-wPlXOovNbfybOrTrrrsE
  7371. nPMZNyiK1y0kmvPOrVnJmNVz3shuqcF1dfxL3JypCG9eTCySS-41FV3TAjnBe9pYJTTzl
  7372. nKhJaQMD7bOqAyheugwivunLcmzPx+-kGhXVyhGx8qHexI0RDm6Y3605UxRWTKuVdVuBN
  7373. ncAeHP7b-PEmQ1PUHSHveSEFO-ku2+v1WKsnxgKvujRypJcoPVIG92tOx70kCbvvjgRty
  7374. nJwqT+J4f+4VBC9FgRPHgSRiKViOxX2t9Q8YxalNiSDsiuyCRhlr7rz6094200hkaOhyz
  7375. n3tSxeL8vz581FGjp65wOmODanKJmsxSNcFoP+GXSpnnJxQHSZt9JsFzk2zNj-y08Qymg
  7376. nVIKAzAkAdbF07qY9+CYejAilMt45RgTiWMEqPpuywBmaU9Zi81MDrPF7rsp0T9sQn7iz
  7377. ncUQny6zhK63mE2VYL5mBv1nUi9iuiqbKFwN2VgR5+VD5nLqCqvktWlTEEqiMwnYFls4Q
  7378. nsvQzT+wbB5nTcT9NbAYHzklLFQXqlYJqmGhoSu9WSLIFT81WFStldRArPT+BK942QwIQ
  7379. n7Ioth1Te+KRff9lgZrtvtwPxBLuB0RFJzH53YNiyawSiHy12FCt1cofG-DLV9yyl0oGX
  7380. nHLeHrKlemKJPhO0kojRASBnCDdqZwujH1Tn3WQqeh36BfbVLlNtszzlO8+suWqDlMycD
  7381. nlEtoPG1LQ8MslIxdso-q1fFCCIcv1JKjemHi4z3Nj+KHncdn8ToDTSHa1WIZ1Gal8Yeg
  7382. nFczho3F-ay8B24reDHcql1tnEP39-Lc2UusUCU6u3at5XnZljCbMREovwQSjV3x-u7W2
  7383. ni0XS87w1up1fRWnMR8vgvCuQ1NcAdnDe42hjNHVyq4yxbxwlZrZnTykzSG0STr0mCIrP
  7384. njPYaDd8rZwTu45IkwcyN-S2mHOLWodumixe1Vrq4PZtScJ5m1zyGOTRxESTilkzL4suW
  7385. n1+L8u25WcnWnHVVza4TR5sPpdbi+gm9E5pc4eeHHquQc+HMNO64Z2ys1I8hP-mmWCNL7
  7386. n1V+-Cec94yju5J+hJXQbJi62o0qocyJKNdG4voRdMdf2-eDXQKdkGtqyk3cBbefxBcs1
  7387. ntXTDUxL9wFha+ZCJaV5K4eo49KfIigw0kzyCkKeICPvpZQKQNQ2G0pNPgAK0u6B4myw7
  7388. n0wEKr99UeEJju1WB7kRj7hv1rkA+bEXtL1BXo2IBM4zwAkVm9GaS-fGqS1mFF+Ph0eLR
  7389. nO76hg0TNsAhF7caIXv665-OMqas2dqYm60Kljfao1EBgeV3HErwQ8gwwv1PnfdoRvi44
  7390. nDfnL5wA2cVrhCH+hvLTg+ekl9+4UqCbQv+S+JPS3KOSn+7KS8B4HvIMlf2Rgv7Voe+iZ
  7391. nrJTMEKfczlw087qEVeTWRi16pcukBFC0BM2WzPZKUUARmd0O-jzR6544UXuvketIu3m9
  7392. nG92IMVwZG01qn6wnmqN8Apcmd9a2iWtFeOlftIdM1OC11qY1z0MgcmmXpJrb1hukcKSW
  7393. nXv8-pLmGNQlXllDyFHHiZTxr6Kv8zxYmqTyrTLqnLkBlYx6KSUMrtF7eJM7jLM7S0cyN
  7394. n7jTpbGv4DSoq66ymeGKwyJss5Wahp-Td2la3jpUd3F15cal2ndLUaZkUT2O7O31sYqIt
  7395. nPw6pNHEdsw+gfizmKROCFNhlKsJGheX35TnjKynn6Jk3L43tUSJV-OsgcqkuPV9mslah
  7396. nV2xB8ECgX1926WG0y0qKoaIN2M6xm-0i52T4Emtg8AAWWrFjBKEoKDGEfa+CfbqiFR5r
  7397. nDp-9+kEI++6+0+-+0G6SFPr8Kt63++-y1U++0k+++3VMF2J0JIQiF2x1vJTTPxgq25sL
  7398. nsDzVo7RqUCraFryZ1xhOlqgBB2pV7oq4MEyoR986G8F+Ib4ojrtrFwdpJrRv5h+2W4LS
  7399. nwPjjjXgS3TWDbxjPwzbPurSXv81pAnejfM5XuT2F9934tF4CXdwSbHkxSzuRDHDPxYtj
  7400. neU15NqTDMBr1f363r8WBETSRDE+LecQpEiYEuls8vMDHumtUAFpZz5iyKAoyj3ZQn7Tw
  7401. n1S0eEcSUDFU9KyKQAe25Ks6mDRldIsk-RG+Tk6TKcTRU5SWafHKG8PTru9HNA30c0AHP
  7402. nAV+8gVQX8CxhfVK3VsPyCepeDyKUyvv8381eaY2CyEDvhAvSus8KZGSmMyV6Du9JU+fE
  7403. nqwu-rFdkqhxBIp92PN0jgbJ-0J-6PK8ODJ+efHJSfqjVKaj3HqKWLJjjYJBZg26pOgDT
  7404. njcV0cGZi2r4uCd1Qha2ykcgQ1sbljTn4P-Q+PRFOptc82CkikpErU1Rp1Kj5Md2zuJ3o
  7405. nSE0X4e9Kc+bO4Y8Z10JqMTCCJlKj5mNEuVeXiA4d+VjZveGu1XTO2nRmqHRkIeV32FMD
  7406. nwu1jYKJ5lmJZRcbIDVy4rpK0jezvTsDtoO6zKjFzoO6rvxxQkK6pHDpToXVCLvaC0UfA
  7407. nPO5BVaBib4dWFL7Zc083e7EjcR-ZGJaM+83jdLuX1+ph4r6bpcj+bKSrbiJq5fOJ7SbA
  7408. nso+kF2jZCPQwJSDwQUIlj2H4IQPJzUciId-uZk2BS+txflLUd34u5e7t0lh8qEzhEZ6c
  7409. nc8656hpMqiolvtko+OIWLZGFfZPiGx9CRY2Pki04jPoZKaDEMNHZ3SNr2NYdURRzlSAp
  7410. nKwsadmSQ0-zMIcfEQkja3Klpe4F9VJFhByMBculf0lIGGrs05pHHljt0i3VBK730CmeU
  7411. nRToohiVSZLnLhhM3Dx0HXtCXx5-81xTLMW-QImVLkAB1Z5AwmbNfLFTL76bPqxBbQt9l
  7412. nRxj7qNAGIIdtXGFIpkcnbnjR-dzWY9OoIG8Z6jb8RbL-hvWQSBdCXv4aAZleGzeeaDT3
  7413. n7v0h580hwWG7ls90jyqYOR87+AjHITfbasvXq+q4mVNmThMCpNpAmrJhwrWaVUsWWJJe
  7414. nzzSLBr-y0EisLgpVQLKkzIiZLRo18hzjHc1IYMGElHF+Qhgon89K-YSNBU3ReL77SqWz
  7415. nR5OZSTYOE4EyCWf+sqJ6B0cfXeCgdldghOwM8OcbTNDo6bZuNYa80k6tPNoCz10BovbI
  7416. nnVBAesUtVXWRxs9gRXttd+pzSTGHk6g9VOD57oCcbkv+l4Vv89M92SMpGvnHIf1VXqHx
  7417. nYqof0vc2mIxl7MTw87x29eToG88fySdeidchCK0OidcbG9mFFhZK4eqkLoIQBj3OvCas
  7418. n5drHv6dbrUTGuYP82jb2kHGkMVOUiFtIqOVm8a2uct5h44cAXnpspLyJp9-R09pRT1n6
  7419. nQaQRu566+ZDGACb3UQ-oG9ovLmsjZlzabyQTM5NtDZzhlg6FwAq9nZYbDRwNiK4GxFXs
  7420. nNPehJIyuJZWrH-vF7DA7E0vu4-j+heFq93kmbkfq4XSIC1QuZ+EzE1w1GBIZpUtJoEAy
  7421. nO-xwgXzz-Xit7zi9G5lrVaHltTuaC0brVaFmSUKkJULY9iTF4oRnpmHXKHHidfG67ydk
  7422. nfrZsALY7KoomYksAf81nAf1GOFynzVvZij5wDhPnqtjFNiD5cqnRVOFpF1iND7TXwqdm
  7423. n7Xh83JERDTkMhdKKOs0WQHvl3WTcILOjOZoAUeEGnmsj9iMTfpNXS9RQT7fH7rTAQjvd
  7424. nQga94D7dmd5bBBz6wTuHZmSSFqW0ZpMQtbS1MpXwww7RQ6AM18BASRUWQODDrrFVOGrR
  7425. nBcA9H5u4jBb8jquzPYWheSkX-gaT5TPyjNB9yTXpuMindwQbFuDgPp-9+kEI++6+0+-+
  7426. n0G6SAHemuVQ1++1r-E++0k+++3VMF2J0JIQiG3BIPNHBPxgs2ALj-jkzj5MDOPTyY7rq
  7427. noAg0aqtH34WvE6ggQeL3YIG26fLweCnywQLCI5OwGSC977BuwyMrXzd29HYxbvr03lfX
  7428. nTDMvfbD8UT0J98Z6y8XtAdzxZ5JQYt73Tbu4exnWqinZsHSwRtpmBTLYobkqbzp16Ffj
  7429. ng3Zh8YmzYpupKJTPxRgr6jabpeFV54tjfqsyE3DhhL2hUgz7C6c9dAt2X0fm1Q25oleb
  7430. nv+614xmi8XEyx0eh5dOgBcx8PfPfub9xxfKIj9qxTDoSXRYjwk1KJXZtZX0pgjM+vFp7
  7431. nIK9xqDZgBNm5xOuZU-p-MMAZhjANg1gYMiiBnLgokTRbxuQGZi7XNxIHnfN5NpzwW7W5
  7432. nkMQIoKSPn57Er4yv+XsaXANOgK0xjtAer5e-oUOS0MJZsU5UlQIT3mz3LHnoCqxl-BSM
  7433. n2-DT-G9IbEeetXQWq7CgKWBBSlsTHC8xHYStsGL5Jp2fhJjDvGODtz5C1CWxdiQ98ATn
  7434. nOtpbLUkEKWK3v78lNmYd2JJDlFPxaoY8eJMNhzeZvNiPetgD0wH2iWdcNBbBZON0-Sl2
  7435. nsw5MF3aPa-V9Bf4Xm7nGG4nzLaWzbsG8nWzmA6rM37o7JSZ1i8-XVCcAXPSd79ZlDW55
  7436. n8PrGsLq-G795NyJcO5tpw14ObGLgQcgLbTdCvW9lfU8LtMS-vtN9LYvmln3pgiwZFUZW
  7437. n4M1AsXtUudXvmMkqiWVC12ji2AoDCGtsxzLRwb7vpVKhE4JTrJ3xVoMN8kTuEJ0fJPJZ
  7438. nUifzERqghqyS0efoTfae2+SeHQDnG89U0wzXgSt6OGMrRePi43RhgtOD-d-AHn8ATWVR
  7439. nCQ5JGtFerkxgGj+SLtsm8dZjdgwHbHwswE3jkJms3ER1w4pEDQN0pLybA+OHdXKTIs2p
  7440. nagFk2VgcGFdJQClb6REQhtf6qcW1nlDiuHlNmLhUPkTErgHWsGRvC94LNcvkiSMNXAkJ
  7441. nClay8hwy3H4mjZnnc7J2y7F2TXfGCKLgwvTZLrxzss25edADVwR1qnklh8cAvFJPYpm5
  7442. nOKIyykxEGkA23++0++U+E+YW5jZYbt0I++++jE++++g+++-4GIl3LoZ29YF7Kci6Q53p
  7443. n0bJL02gh8gvAnpAkp1AoIB-JA3R6mWlFG2ZBnYx79J6cmIUgsSIe9Wocm0we8ENmIlIW
  7444. n6c0uR00IYE4IMKmUkwgJ4UeK8Gt7n2h792dF80pBnEANUmFIIE2FsiI00U0p4dis8eHZ
  7445. n3yIaZVHf8GUstdGY3iIZZaGKdG7QYAz9JJeQaNSisC6Tf+-qgVsj3k-EGk203++I++6+
  7446. n0+-+0G6SVTBL7Owc++1y8E++0k+++++++++++0++++++++++K3V2FI7JFmt3K2JEGk20
  7447. n3++I++6+0+-+0G6SFPr8Kt63++-y1U++0k+++++++++-+0++++1M8+++K3V2FI7JFmt2
  7448. nHoBEGk203++I++6+0+-+0G6SAHemuVQ1++1r-E++0k+++++++++-+0++++0H9U++K3V2
  7449. nFI7JFmt6IpFEGk203++I++6+0+-+0G6SyKGTY7E+++0x++++0k+++++++++-+0++++1H
  7450. YAE++FYZAFJx7F0t2GJdEGkI4++++++E+-+1Y++++Y16+++++
  7451. *XXBUG Version 3.00 by Chad Wagner
  7452.    -------------------------->CUT HERE<-----------------------------
  7453.  If you have downloaded this script file, remove any captured
  7454.  communications header and then enter
  7455.  
  7456.   DEBUG < filename
  7457. where filename is the name of this script file.
  7458.  
  7459. Chapter 46: Increasing file size
  7460. ================================
  7461. I have a non-executable binary file which is currently 642 bytes long. I
  7462. would like to increase its size by about 100 bytes by filling the added
  7463. bytes with no-ops (00h).
  7464.  
  7465. The easiest way to do it is through DEBUG.  Are you adding it to the
  7466. beginning or the end, or neither?
  7467.  
  7468. Ok, start debug naked on the command line:
  7469.  
  7470.         DEBUG
  7471.  
  7472. You should get the "-" prompt.
  7473.  
  7474. Fill memory with lotsa zero's with:
  7475.  
  7476.         F CS:0100 1000 0
  7477.  
  7478. Tell debug what program to load:
  7479.  
  7480.         N {progname}
  7481.  
  7482. Tell debug to load it:
  7483.  
  7484.         L
  7485.  
  7486. The size of the program is in BX:CX. Modify CX (BX should be zero for
  7487. such a short file) by entering:
  7488.  
  7489.         RCX
  7490.  
  7491. You'll get a : prompt after debug shows the current value for CX. Add
  7492. whatever you need to this number (remember you're working in HEX).
  7493.  
  7494. Once you have reset the CX value, rewrite the file to disk with:
  7495.  
  7496.         W
  7497.  
  7498. You should get a message "Writing xxxx bytes"
  7499.  
  7500. Finally exit debug with:
  7501.  
  7502.         Q
  7503.  
  7504. You can also probably use a hex editor... there are quite a few of
  7505. shareware ones floating around, any one should do the job just
  7506. fine... Unless...I don't know what file this is, but it may give
  7507. some kind of a header that contains its specs -- this may include
  7508. file size -- and it may not work right with a different size...
  7509.  
  7510. First run debug with the name of the file as a parameter.
  7511.  
  7512. Then
  7513.  f 382,3e6 00           {282h=642d and 2e6h=742d; 100h is added}
  7514.  rcx                    {cause debug treats programs as COM files}
  7515.  2e6                    {set the size to 742d bytes}
  7516.  w                      {write}
  7517.  q                      {quit debug}
  7518.  
  7519. That should increase the size to 742 bytes.
  7520.  
  7521.  
  7522.  
  7523.  
  7524. Appendix 1:
  7525. ===========
  7526.  
  7527.  
  7528. Alphabetical listing of files
  7529. =============================
  7530.  
  7531. ALL.BAT
  7532. AUTOEXEC.BAT
  7533. BACKUP1.BAT
  7534. BAT.BAT
  7535. BUMPDAY.BAT
  7536. CLEAR.COM
  7537. COLDBOOT.COM
  7538. COLROCHT.BAT
  7539. CPTOA.BAT
  7540. DATES.SCR
  7541. DBLTEST.BAT
  7542. DEZIP.BAT
  7543. DO.BAT
  7544. DO1.BAT
  7545. DO2.BAT
  7546. DO3.BAT
  7547. ENLARGE.BAT
  7548. ERASE.BAT
  7549. ERASE1.BAT
  7550. ERASE2.BAT
  7551. FALLBACK.SCR
  7552. FIND.BAT
  7553. GETDATE.BAT
  7554. GETTIME.COM
  7555. HOKUS.BAT
  7556. HOUR.COM
  7557. INCBY1.BAT
  7558. ISDBL.COM
  7559. ISDBL.SCR
  7560. ISWIN.COM
  7561. LAF.BAT
  7562. LAFUEXT.BAT
  7563. LAFUEXT1.BAT
  7564. LAFUEXT2.BAT
  7565. LOOKFOR.BAT
  7566. MAIL.BAT
  7567. MON.BAT
  7568. MON.COM
  7569. MON.SCR
  7570. MPAUSE.COM
  7571. MULTIJOB.BAT
  7572. MYBATCH.BAT
  7573. NO.COM
  7574. NOABORT.COM
  7575. NUMLOCK.COM
  7576. POPD.COM
  7577. PUSHD.COM
  7578. PUSHPOP.SCR
  7579. RAMDRIVE.BAT
  7580. REBOOT.COM
  7581. REPEAT.COM
  7582. REPEAT.SCR
  7583. REPLY.SCR
  7584. RESET.SCR
  7585. SAV1.BAT
  7586. SAVE.BAT
  7587. SEARCH.BAT
  7588. SEARCH1.BAT
  7589. SEARCH2.BAT
  7590. SEARCH3.BAT
  7591. SPFOWARD.SCR
  7592. SPLITNAM.BAT
  7593. TEST.SCR
  7594. TESTMENU.BAT
  7595. TOA.BAT
  7596. TODAY.BAT
  7597.  
  7598. Appendix 2:
  7599. ==========
  7600.  
  7601. Processing batch files
  7602. ======================
  7603.  
  7604.  
  7605. In this appendix you will learn:
  7606.  
  7607. ■ How you create batch files
  7608.  
  7609. ■ How an autoexec.bat file works
  7610.  
  7611. ■ How to execute a batch file
  7612.  
  7613. Why do we use batch files?
  7614. --------------------------
  7615.  
  7616. We often repeats the same keystrokes, the same errors and
  7617. commands to accomplish simple tasks. The disk operating system
  7618. MS-DOS provides the capabilities to write one or more commands
  7619. into a special file called a batch file. To execute the commands
  7620. you just have to write the name of the batch file.
  7621. All batch files has the extension BAT, but to run the file
  7622. you only have to type the name.
  7623.  
  7624. MS-DOS executes the batch files containing your commands
  7625. exacetely as you should have written them on your keyboard.
  7626. This is what we call a batch file process.
  7627. By the benifit of using a batch file, you only need to type
  7628. one command, instead of many. Learning how to create and run
  7629. your batch files might produce your own personal MS-DOS commands.
  7630.  
  7631. How to create a batch file
  7632. --------------------------
  7633.  
  7634. To create a batch file you can open the line editor Edlin,
  7635. or you can copy the batch file from the keyboard. To do this
  7636. you perform a copy operation using CON as the source of your
  7637. batch file's input. Or you can choose and editor like EDIT that
  7638. comes with the operating system MS-DOS. My favourite word processor
  7639. is QEDIT which provides a simple and fast method of creating an
  7640. ASCII text. Both EDIT and Qedit are excellent tools. As your batch
  7641. files grow larger, I will recommend you to use a full-screen word
  7642. processor like QEDIT.
  7643.  
  7644. In the demonstration below, I choose to create the batch file
  7645. by using the copy con method. Now let's take a look at a simple
  7646. example. Let's say that we will create a batch file which formats
  7647. and checks a new diskette. To begin the batch file copy operation,
  7648. type the following at the command prompt:
  7649.      
  7650. ┌─┐
  7651. │1│  Type the following at the C:\>
  7652. └─┘
  7653.      copy con testny.bat
  7654.  
  7655.      Press Enter. This command asks MS-DOS to copy
  7656.      information from the keyboard to the file testny.bat.
  7657.  
  7658.  
  7659. ┌─┐
  7660. │2│  Type the following lines, press Enter after each:
  7661. └─┘
  7662.      REM This file formats and
  7663.      REM checks new diskettes.
  7664.      REM The batch file is named TESTNY.BAT
  7665.      PAUSE Insert a new diskette in drive A:
  7666.      FORMAT A: /v
  7667.      CHKDSK A:
  7668.  
  7669.  
  7670. ┌─┐
  7671. │3│  After the last command, press CONTROL-Z or F6 and Enter
  7672. └─┘  to save the batch file. As a result, MS-DOS creates
  7673.      the batch file and displays the following message:
  7674.      "I File(s) copied".
  7675.  
  7676.  
  7677. ┌─┐
  7678. │4│  To execute this batch file, type the following command:
  7679. └─┘
  7680.      TESTNY
  7681.  
  7682.  
  7683. The result is the same as if the lines in the batch file
  7684. had been entered from the keyboard as single commands.
  7685.  
  7686.  
  7687. Understanding batch file processing
  7688. -----------------------------------
  7689.  
  7690. There are a few things you should know before you try to
  7691. run a batch process with MS-DOS.
  7692.  
  7693.  
  7694.    ■ All batch files have the file extention BAT
  7695.  
  7696.    ■ To run a batch file, you only need to type
  7697.      the filename without the extention.
  7698.  
  7699.    ■ Press CTRL-C while you execute a batch file, if
  7700.      need to terminate the process. MS-DOS will ask your
  7701.      confirmation.
  7702.  
  7703.    ■ If you remove a diskette containing a batch file
  7704.      which is being executed, MS-DOS will ask you to
  7705.      insert to fullfill the process.
  7706.  
  7707.    ■ You can run one batch file within another if the name is
  7708.      stated in the last line of the batch file. The capability
  7709.      allows you to call a batch file from within another
  7710.      only until the second file completes execution. CALL and
  7711.      COMMAND /C will discussed on another place in this book.
  7712.  
  7713.    ■ You may use any redirection operator (< > >>) in
  7714.      a batch file. If you need more information see
  7715.      below under "About Commands".
  7716.  
  7717.    ■ Use the @ (at sign) in the beginning of a line
  7718.      in a batch file to avoid a line from being displayed.
  7719.  
  7720.    ■ You may use a pipe redirection operator (|) in your
  7721.      batch files.
  7722.  
  7723.    ■ Typing the name of a directory or a drive
  7724.      will affect all commands in a batch file.
  7725.  
  7726.    ■ The of strings in environment will affect all
  7727.      commands in a batch file.
  7728.  
  7729. NOTE: If you have got more than one externel command in your
  7730. environment with the same name, but with different extensions,
  7731. MS-DOS will only execute one of them in the following
  7732. way, decided by file extension: .com, .exe, .bat.
  7733.  
  7734. Assume that your hard disk contains the files format.com and
  7735. format.bat. If you type the command format at the prompt, MS-DOS
  7736. will always run format.com first. To execute a batch file called
  7737. format.bat, this file must be loacted in a subdirectory
  7738. and you have to type the complete path.
  7739.  
  7740. For example, your format.bat file is located in a directory called
  7741. \commands\batch, you must type:
  7742.  
  7743. \commands\batch\format
  7744. to execute it.
  7745.  
  7746. The Autoexec.bat file
  7747. ----------------------
  7748.  
  7749. An AUTOEXEC.BAT file allows you to automatically execute
  7750. programs when you start MS-DOS. This is useful when you
  7751. want to run a specific package (for example, certain utilities
  7752. to tests your computer's hard disk and memory) under MS-DOS,
  7753. and when you want MS-DOS to execute a batch program each
  7754. time you start your computer. You can avoid loading two
  7755. separate disks to perform either of these tasks by using
  7756. an AUTOEXEC.BAT file.
  7757.  
  7758. When you start your computer, MS-DOS searches the disk for
  7759. a file named AUTOEXEC.BAT. The AUTOEXEC.BAT file is a batch
  7760. file that is automatically executed each time you start the
  7761. system. It must be located in the root directory.
  7762.  
  7763. If MS-DOS finds the AUTOEXEC.BAT file, the file is immediately
  7764. executed and the date and time prompts are bypassed. If MS-DOS
  7765. does not find an AUTOEXEC.BAT file when you first load the MS-DOS
  7766. disk, then the date and time prompts appear
  7767.  
  7768. Figure 1.1 shows how MS-DOS uses the AUTOEXEC.BAT file:
  7769.  
  7770.      ┌───────────────────┐                             FIGURE 1.1
  7771.      │  You load         │                             ==========
  7772.      │  MS-DOS from disk │
  7773.      │                   │
  7774.      └─────────┬─────────┘
  7775.                │           
  7776.      ┌─────────┴──────────┐
  7777.      │  MS-DOS looks for  │
  7778.      │  CONFIG.SYS        │
  7779.      └─────────┬──────────┘
  7780.                │          
  7781.        ╔═══════╧══════╗   
  7782.        ║ If CONFIG.SYS║       Yes -
  7783.        ║ exists       ╟────────────────────────┐
  7784.        ║              ║                        │
  7785.        ╚═══════╤══════╝                        │
  7786.                │                               │
  7787.                │                               │
  7788.            No  │                     ┌─────────┴─────────┐
  7789.               │                     │ MS-DOS            │
  7790.                │                     │ configures the    │
  7791.                │                     │ system            │
  7792.                │                     └─────────┬─────────┘
  7793.                │                               │         
  7794.                │                               │         
  7795.                │──────────────────────────────┘
  7796.                │                                         
  7797.                │                                         
  7798.      ┌─────────┴──────────┐                              
  7799.      │  Command processor │
  7800.      │  is automatically  │
  7801.      │  loaded,           │
  7802.      │  COMMAND.COM       │
  7803.      └─────────┬──────────┘
  7804.                │                                         
  7805.      ┌─────────┴───────────┐                             
  7806.      │  Command processor  │
  7807.      │  looks for AUTOEXEC.│
  7808.      │  BAT file.          │
  7809.      └─────────┬───────────┘                             
  7810.                │                                         
  7811.        ╔═══════╧══════╗                                  
  7812.        ║ Does it find ║      No -
  7813.        ║ Autoexec.bat?╟────────────────────────┐
  7814.        ║              ║                        │         
  7815.        ╚═══════╤══════╝                        │         
  7816.          Yes  │                               │
  7817.      ┌─────────┴───────────┐         ┌─────────┴─────────┐
  7818.      │   AUTOEXEC.BAT file │         │ MS-DOS time and   │
  7819.      │   is executed       │         │ date prompts are  │
  7820.      │                     │         │ issued            │
  7821.      └─────────────────────┘         └───────────────────┘
  7822.  
  7823. How to create an AUTOEXEC.BAT file
  7824. ----------------------------------
  7825.  
  7826. If, for example, you want to automatically load PATH, DATE AND TIME
  7827. and run a program called MENU each time you start MS-DOS, you could
  7828. create an AUTOEXEC.BAT file as follows:
  7829.  
  7830. NOTE: When you create an AUTOEXEC.BAT you must remeber to locate
  7831. it in the root directory.
  7832.  
  7833. ┌─┐
  7834. │1│  Type the following command and push ENTER:
  7835. └─┘  
  7836.      copy con autoexec.bat
  7837.  
  7838.      This statement tells MS-DOS to copy the information
  7839.      from the console (keyboard) into the AUTOEXEC.BAT
  7840.      file. Note that the AUTOEXEC.BAT file must be created
  7841.      in the root directory of your MS-DOS disk.
  7842. ┌─┐
  7843. │2│  Now type the lines below:
  7844. └─┘
  7845.  
  7846.      PATH C:\;C:\DOS;C:\WP50;C:\NORTON;C:\BATCH;C:\UTILS
  7847.      DATE
  7848.      TIME
  7849.      KEYB NO 865 C:\DOS\KEYBOARD.SYS 
  7850.      PROMPT $p$g 
  7851.  
  7852. ┌─┐
  7853. │3│  This statement goes into the AUTOEXEC.BAT. It tells MS-DOS
  7854. └─┘  to keep a certain path in the environmentand to display
  7855.      both the date and the time. Press Ctrl-Z or F6 to put
  7856.      an end-of-file mark at the end of the file and save it
  7857.      to the disk.
  7858.  
  7859. When you have created an AUTOEXEC.BAT as the file above, the same
  7860. commands will run automatically whenever you start your computer
  7861. Path will be defined, you will be asked for date and time, and
  7862. the prompt will be  C:\>.
  7863.  
  7864. How to cretate a batch file with replaceable parameters
  7865. -------------------------------------------------------
  7866.  
  7867. There may be times when you want to create a program and run
  7868. it with different sets of data. These data may be stored in
  7869. various MS-DOS files.
  7870.  
  7871. When used in MS-DOS commands, a parameter is an option that
  7872. you define. With MS-DOS, you can create a batch (.BAT) file
  7873. with dummy (replaceable) parameters. These parameters,
  7874. named %0-%9, can be replaced by values supplied when the
  7875. batch file executes.
  7876.  
  7877. For example, when ypu type the command line:
  7878.  
  7879. copy con newfile.bat
  7880.  
  7881. the next line you type are copied from the console to a file
  7882. named NEWFILE.BAT on the default drive:
  7883.  
  7884. del %3.doc
  7885. copy %1.doc + %2.doc %3.doc
  7886. print %3.doc
  7887.  
  7888. Now press Control-Z and then press Enter. MS-DOS responds
  7889. with this message:
  7890.  
  7891. 1 file(s) copied
  7892. C:\>
  7893.  
  7894. The file NEWFILE.BAT, which consists of three commands, now
  7895. resides on the disk in the default drive.
  7896.  
  7897. The dummy parameters %1 and %2 are replaced sequentially by
  7898. the parameters you supply when you execute the file. If
  7899. you use the dummy parameter %0, it is always replaced by the
  7900. drive name, if specified, and the filename of the batch file
  7901. (for example, NEWFILE).
  7902.  
  7903. NOTE:
  7904.         1. Up to 10 dummy paramters (%0-%9) can be
  7905.            specified. Refer to the MS-DOS SHIFT command if you
  7906.            want to specify more than 10 parameters. (Chapter 6.)
  7907.  
  7908.         2. If you use the percent sign as part of a filename
  7909.            within a batch file, you must type it twice. For
  7910.            example, to specify the file AB%.EXE, you must
  7911.            type it as AB%%.EXE in the batch file.
  7912.  
  7913. How to run a batch file
  7914. -----------------------
  7915. To execute the batch file NEWFILE.BAT  and to specify the
  7916. parameters that will replace the dummy parameters, you must
  7917. enter the batch filename (without its extension) followed by
  7918. the parameters you want MS-DOS to substitute for %1, %2, and
  7919. %3.
  7920.  
  7921. Remember that the file NEWFILE.BAT  consists of 3 lines:
  7922.  
  7923. del %3.doc
  7924. copy %1.doc + %2.doc %3.doc
  7925. print %3.doc
  7926.  
  7927. To execute the NEWFILE batch process, type
  7928.  
  7929. newfile a:memol b:memo2 b:bigfile
  7930.  
  7931. and press Enter. a:memol is substituted for %1,
  7932. b:mem2 for %2, and b.bigfile for %3.
  7933.  
  7934. The result is the same as if you had typed each of the
  7935. commands in NEWFILE  with their parameters, as follows:
  7936.  
  7937. del b:bigfile
  7938. copy a:memol + b:memo2 b:bigfile
  7939. print b:bigfile
  7940.  
  7941. The following table shows how MS-DOS replace each of the
  7942. above parameters:
  7943.  
  7944. BATCH           PARAMETER1      PARAMETER2      PARAMETER3
  7945. FILENAME           (%1)            (%2)            (%3)
  7946. ----------------------------------------------------------
  7947. newfile         memol.doc       b:memo2.doc     b:bigfile
  7948.  
  7949. Remember that if you specofy the dummy parameter %0 in your
  7950. batch file, it is always replaced by the drive name
  7951. (if specified) and the filename of the batch file. If you
  7952. do not need to refer to the batch file, start your dummy
  7953. parameters at number %1.
  7954.  
  7955. This method with replaceable parameters improves your batch files,
  7956. make the more flexible and easier to use. For example, you can
  7957. create a batch file called SORTER.BAT. The file sorts a file
  7958. containing a specified sequence of characters or a string.
  7959. When you run the file to sort the batch file, you tell MS-DOS
  7960. what string you want, what file to search to find the string
  7961. and what temporary file you want to be used in sorting.
  7962. SORTER will print the result to a printer.
  7963.  
  7964.  
  7965. ┌─┐                                     
  7966. │1│  To create the file SORTER.BAT type the following command
  7967. └─┘  and press ENTER:
  7968.  
  7969.      copy con sorter.bat
  7970.  
  7971.  
  7972. ┌─┐
  7973. │2│  Type the following commands:
  7974. └─┘  
  7975.      type %2 | find "%1" > %3
  7976.      type %3 | sort > prn
  7977.      del %3
  7978.  
  7979.  
  7980. ┌─┐
  7981. │3│  Save the batch file by pressing CONTROL-Z and ENTER or F6.
  7982. └─┘  The Batch file SORTER.BAT consists of three command lines
  7983.      and is located on the hard disk.
  7984.  
  7985.  
  7986. How to use named parameters in a batch file
  7987. -------------------------------------------
  7988.  
  7989. In addition to ten numbered replaceable parameters, you
  7990. use named parameters in a batch file. Named parameters allow
  7991. you to define your replaceable parameters with names instead
  7992. of digits. When the referance is used in a file, the name
  7993. should be placed between two percent signs.
  7994.  
  7995. Named parameters are different form replaceable parameters. You
  7996. can't specify the variables at the prompt. When MS-DOS encounters
  7997. a named parameter in a batch file, MS-DOS searches its environment
  7998. for corresponding entry.
  7999.  
  8000. The SET command allows you to change or display the entries in the
  8001. MS-DOS environment.
  8002.  
  8003. For example: Assume that you want to create a batch file called
  8004. MYDEL.BAT. The batch process moves a file you want to delete
  8005. to another directory. This is a useful method to ensure yourself
  8006. that you don't delete an important file by accident.
  8007.  
  8008. The file MYDEL.BAT consists of the following commmands:
  8009.  
  8010. @ECHO OFF
  8011. ECHO Before you use the batch file you need to
  8012. ECHO specify the directory by typing the following
  8013. ECHO command at the MS-DOS prompt:
  8014. ECHO set deldir=directory
  8015. ECHO Press Control-C to terminate if you have forgotten
  8016. ECHO to set deldir or if deldir does not exist.
  8017. PAUSE
  8018. COPY %1 %deldir%
  8019. DEL %1
  8020. DIR /W %deldir%
  8021. ECHO You are finished
  8022.  
  8023. To get MYDEL.BAT to work you've got to create a directory
  8024. named deleted. The following command sets the directory name
  8025. to deleted:
  8026.  
  8027. set deldir=\deleted
  8028.  
  8029. To move the file CONFIG.BAK to the directory deleted, type
  8030. the following command:
  8031.  
  8032. mydel config.bak
  8033.  
  8034. The batch file replace automatically the %deldir% paramtere
  8035. with the directory called deleted.
  8036.  
  8037. Many users think named parameters are easier to use than
  8038. replaceable. This is because you don't have to include so much
  8039. information at the prompt. For example you don't need to type
  8040. the directory name at the prompt, but you kan still change the
  8041. directory name without editing the batch file.
  8042.  
  8043. How to run a batch file
  8044. -----------------------
  8045.  
  8046. To run the batch file SORTER.BAT type the name of the batch file
  8047. followed by the parameters you want MS-DOS to use as replacements
  8048. for  %1, %2 and %3.
  8049.  
  8050. If you register this book "RUN BATCH RUN" you will
  8051. receive included a disk containing files to use in
  8052. this tutorial. The file contains a list of customers
  8053. and capitals.
  8054.  
  8055. The file looks like this:
  8056. -------------------------
  8057.  
  8058. Adamsen, John                        London
  8059. Olsen, Gerd                          Copenhagen
  8060. Kvaaler, Trygve                      Oslo
  8061. Fredriksen, Peder                    Copenhagen
  8062. Hansen, Ivar                         Oslo
  8063. Dyrhaug, Arild                       Oslo
  8064. Bye, Eric                            New York
  8065. Howard James Tyler                   Los Angles
  8066. Singh, Kushwant                      New Delhi
  8067. Antin, Jean Christian                Paris
  8068. Stang, Friedrich                     Berlin
  8069. Havel, Vaclav                        Prague
  8070. Holmquist, Lasse                     Stockholm
  8071.  
  8072. If you need an alphabetically list of customers in Oslo
  8073. you can run SORTER.BAT, with the right parameters, and
  8074. type the following command and press ENTER:
  8075.  
  8076. sorter Oslo a:\custom.tut temp.fil
  8077.  
  8078.  
  8079. The outprint will look like this:
  8080.  
  8081. Kvaaler. Trygve                      Oslo
  8082. Hansen, Ivar                         Oslo
  8083. Dyrhaug, Arild                       Oslo
  8084.  
  8085. Below you'll find a table showing how MS-DOS
  8086. replace each parameter in the example above:
  8087.  
  8088. Batch filnavnet          (%0)        sorter
  8089. Parameter1               (%1)        Oslo
  8090. Parameter2               (%2)        A:\KUNDER.TUT
  8091. Parameter3               (%3)        temp.fil
  8092.  
  8093. The result would have been the same if you had written the commands
  8094. in SORTER with parameters as below:
  8095.  
  8096. type a:\kunder.tut | find "Oslo" > temp.fil
  8097. type temp.fil | sort > prn
  8098. del temp.fil
  8099.  
  8100. MS-DOS batch processes save your time and are easy to use.
  8101.  
  8102. Appendix 3:
  8103. ===========
  8104.  
  8105. About the author
  8106. ================
  8107.  
  8108.                    WHO IS FINN ROAAS?
  8109.  
  8110. Finn Roaas (born 1948) lives in Oslo. He is a novelist and writer
  8111. and has written both novels, short stories and computer books
  8112. One of the books is a tutorial in batch file programming.
  8113.  
  8114. He is a Senior Executive Officer, systemoperator, adminstrator
  8115. and teacher in computing at the School of Computing, which is
  8116. a department OF the academic center OPPLÆRINGSSENTERET in
  8117. Oslo municipality.
  8118.  
  8119. He has a Bachelor of Arts degree from the University of Oslo.
  8120.  
  8121.  
  8122.              HOW TO REGISTER YOUR RUN BATCH RUN BOOK
  8123.              =======================================
  8124.  
  8125. The Run Batch Run is changing all the time. It's dynamic.
  8126. The book will be changed and altered when the author gets
  8127. new things he finds interesting and wants to share with
  8128. other users. If you have got ideas, intersting programs please
  8129. send me a note or an email to finnr@oslonett.no. Your
  8130. registration will support the research of this book, which
  8131. is something a do in my leisure time. When I tired of writing
  8132. and teaching and just want to relax with a glass of wine, I
  8133. work with the Run Batch Run book. It takes my mind to something
  8134. different, I need problems to keep me occupied. Your
  8135. registration will support the research of new material
  8136. and what it costs to maintain this book.
  8137.  
  8138. You can register your current copy, or subscribe for six
  8139. updates. Details are given below.
  8140.  
  8141. ==============================================================================
  8142.  
  8143.     Please remit to:
  8144.  
  8145.     Finn Roaas
  8146.     Ole Reistads vei 39 D
  8147.     N-1068 Oslo
  8148.     Norway (Europe)
  8149.  
  8150.  
  8151.     Please add me as a supporter of THE RUN BATCH RUN BOOK:
  8152.  
  8153.     Name    ______________________________________________________________
  8154.  
  8155.     Company ______________________________________________________________
  8156.  
  8157.     Address ______________________________________________________________
  8158.  
  8159.             ______________________________________________________________
  8160.  
  8161.     City    ________________________________State _______ Zip ____________
  8162.  
  8163.     Country ________________________________
  8164.  
  8165.     Email address  ______________________________________________________
  8166.  
  8167.  
  8168.     Please mark off your selections with (x) below:
  8169.  
  8170.  
  8171.     Basic registration for individuals:
  8172.     -----------------------------------
  8173.  
  8174.     (  ) NOK 100.00   For payment
  8175.                       (ca.US$ 12.00)
  8176.                       A Companion disk is included first time you
  8177.                       register!
  8178.     Option for Basic Registration - for individuals
  8179.     -----------------------------------------------
  8180.     (  ) US$  2.00    Add to have a copy of the most recent version
  8181.                       of the book sent to you on diskett. Only for
  8182.                       registered subscribers!
  8183.                       (In Norway, NOK 10.00)
  8184.  
  8185.                      (  ) 5.25" MS-DOS disk   (  ) 3.5" disk 720KB MS-DOS
  8186.  
  8187.     Wants diskett with all files listed in the book
  8188.     -----------------------------------------------
  8189.     ( ) US$ 8.00      Companian Disk To Run Batch Run
  8190.                       (In Norway, NOK 50.00)
  8191.  
  8192.     Registration of Six Updates - for individuals
  8193.     ---------------------------------------------
  8194.     
  8195.     (  ) US$ 80.00 NOK 480.00
  8196.  
  8197.                       Six updates of the book will be sent to you by mail.
  8198.  
  8199.     ( ) US$  60.00    For all method of payment (No shipping.)
  8200.                       The reader retrieves all new updates emailed
  8201.                       on Internet. Six updates.
  8202.  
  8203.     ( ) US$  50.00    When renewing your subscription for six new updates.
  8204.  
  8205.     Amount ____________________ Date   _______________
  8206.  
  8207.     (  )  Check or money order payable to Finn Roaas in U.S. funds enclosed
  8208.     (  )  SWIFT transfer to 6065.56.31588 (Kredittkassen, Norway)
  8209.     (  )  SWIFT transfer to 0521 1589665 Postbanken, Norway
  8210.     (  )  VISA    (  )  MasterCard    ( ) American Express
  8211.     (  )  Diners Club
  8212.  
  8213.  
  8214.     Credit card number __________________________________ Exp date _______
  8215.  
  8216.  
  8217.  
  8218.  
  8219.   Note: You should not send your credit card number by email, unless
  8220.         the data is sent in PGP encrypted form. For information about
  8221.         how to do this, read the instruction at the end of this book.
  8222.  
  8223.     Discounts for schools and public libraries
  8224.     ------------------------------------------
  8225.     Special rates available for schools and public libraries. For details,
  8226.     send a message to finnr@oslonett.no
  8227.  
  8228.     (  ) Please identify what type of discount you are taking advantage of:
  8229.  
  8230.          Ref: ______________
  8231.  
  8232.          Description: ____________________________________________________
  8233.  
  8234.                       ____________________________________________________
  8235.  
  8236.  
  8237.     Note: You should not send your credit card number by email, unless
  8238.           the data is sent in PGP encrypted form. For information about
  8239.           how to do this, read the instruction at the end of this 
  8240.  
  8241.     Note: All credit card orders given in US$ will be converted to NOK
  8242.           using the current exchange rate. My local card companies require
  8243.           charges to be made in Norwegian currency. Then, the amount will 
  8244.           be converted to your local currency by your card operator at
  8245.           their exchange rate prevailing at the time of transaction.
  8246.  
  8247.  
  8248.   Feedback
  8249.   --------
  8250.   If you already have an evaluation copy of the book, where did you get it? 
  8251.  
  8252.   ________________________________________________  Version number: ____
  8253.  
  8254.  
  8255.  
  8256.   Comments or suggestions for improvement of The Run Batch Run book __________
  8257.   
  8258.   ______________________________________________________________________
  8259.   
  8260.   ______________________________________________________________________
  8261.   
  8262.   ______________________________________________________________________
  8263.   
  8264.  
  8265.  
  8266.     Date ___________________
  8267.  
  8268.     Signature _________________________________
  8269.  
  8270.  
  8271.   ┌───────────────────────────────────────────────────────────────────────┐
  8272.   │  T H A N K   Y O U   F O R   S U P P O R T I N G   S H A R E W A R E  │
  8273.   └───────────────────────────────────────────────────────────────────────┘
  8274.  
  8275.  
  8276. How to send your registration using PGP encryption 
  8277. --------------------------------------------------
  8278.  
  8279. To use this method, you must have a copy of the freeware program PGP 
  8280. (Pretty Good Privacy) by Philip Zimmermann. It is available for MS-DOS, 
  8281. VAX/VMS, Unix, and other computers. 
  8282.  
  8283. Various versions of this program can be retrieved from online services all 
  8284. over the world. If you have access to the Internet, use Archie to locate a 
  8285. recent version. I am currently using version 2.6. You can get a copy from
  8286. the following Web address:
  8287.  
  8288.  
  8289.  
  8290. Follow these steps to encrypt your registration form (you may be able
  8291. to do this _without_ reading the documentation): 
  8292.  
  8293. Step 1
  8294. ------
  8295. Store your completed registration form on your disk using the file name
  8296. ORDER.FRM. 
  8297.  
  8298. Cut out the text below, and store it using the file name ONLINE.ASC.
  8299.  
  8300. *-----BEGIN PGP PUBLIC KEY BLOCK-----
  8301. Version: 2.3a
  8302.  
  8303. mQBNAi0jCjcAAAECAKBK1u0JZHZSEh50P3TdgSApuZCEWQh2Nsxw1pYrC4bgy/md
  8304. bAN3UFrkgwShtnpPIjm+GcXFBiKpZ5kDuT9T9x0ABRG0FW9wcmVzbm9AZXh0ZXJu
  8305. LnVpby5ubw==
  8306. =AXgT
  8307. *-----END PGP PUBLIC KEY BLOCK-----
  8308.  
  8309. Remove the asterisk ()* character at the beginning of the first and last 
  8310. lines of the PGP Public Key before adding it to your keyring. For example,
  8311. the line
  8312.  
  8313.    *-----BEGIN PGP PUBLIC KEY BLOCK-----
  8314.  
  8315. should be changed to
  8316.  
  8317.    -----BEGIN PGP PUBLIC KEY BLOCK-----
  8318.  
  8319. Do the same with the last line.
  8320.  
  8321. Step 2
  8322. ------
  8323. Add ONLINE.ASC to your public keyring using the command:
  8324.  
  8325.   pgp -ka online.asc
  8326.  
  8327. Step 3
  8328. ------
  8329. Encrypt ORDER.FRM using the command
  8330.  
  8331.   pgp -ea order.frm finnr@oslonett.no
  8332.  
  8333. The resulting file will be called ORDER.ASC.
  8334.  
  8335. Step 4
  8336. ------
  8337. Send ORDER.ASC by email to finnr@oslonett.no.
  8338.  
  8339.  
  8340.  
  8341.  
  8342.  
  8343.  
  8344.  
  8345.  
  8346.  
  8347.   ┌───────────────────────────────────────────────────────────────────────┐
  8348.   │  T H A N K   Y O U   F O R   S U P P O R T I N G   S H A R E W A R E  │
  8349.   └───────────────────────────────────────────────────────────────────────┘
  8350.  
  8351.  
  8352.  
  8353.  
  8354. 950801FR
  8355.  
  8356.  
  8357.  
  8358.