home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / doshelp / helpsb.zoo / help / batch / goto / examples.hlp next >
Encoding:
Text File  |  1989-01-01  |  896 b   |  19 lines

  1. SAMPLE command and results    | Comments about the output
  2.  
  3.   :DEL1                Assume that you wanted to be able to use DEL
  4.   IF x%1==x GOTO ALLDONE    with more than one filename. This BATCH file
  5.   DEL %1            would use the first value to delete a file,
  6.   SHIFT                and then shift the next value into first place,
  7.   GOTO DEL1            and continue until all files had been deleted.
  8.   :ALLDONE
  9.                 You will see these lines appear on the screen
  10.   :LOOP                over and over until you break the BATCH
  11.   REM This is an endless loop    processing with Ctrl-C or Ctrl-Break. Notice
  12.   GOTO loop            that the label line must begin with a colon,
  13.                 but upper and lower case do not matter.
  14.  
  15.    :    loop            This loop in a BATCH file will slowly fill up
  16.    ECHO HI >> filler        your disk with a string of "HI"s. Only a
  17.    GOTO loop            Ctrl-Break or Ctrl-C entered from the keyboard
  18.                 will stop the loop.
  19.