home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / doshelp / helpsb.zoo / help / batch / shift.hlp < prev    next >
Encoding:
Text File  |  1989-01-01  |  1.0 KB  |  21 lines

  1. SHIFT
  2.  
  3. The SHIFT internal command is used with BATCH processing to access more 
  4. than 10 replaceable parameters.  SHIFT cannot be executed directly from 
  5. the keyboard. 
  6.  
  7. BATCH files are normally limited to handling 10 parameters, %0 
  8. through %9. The SHIFT command allows you to deal with more parameters.
  9. SHIFT shifts the value for replaceable parameter "n" into parameter 
  10. "n-1". For instance, if %0=A and %1=B and %2=C, after a SHIFT command 
  11. then %0=B, %1=C, and %2 is now null. Another SHIFT would make %0=C, etc.
  12.  
  13. SAMPLE SHIFT use          | Comments about the BATCH file
  14.  
  15.   :LOOP                Assume that you wanted to be able to use
  16.   IF x%1==x GOTO ALLDONE    DEL with more than one filename. This
  17.   DEL %1            BATCH file would use the first value to
  18.   SHIFT                delete a file, and then shift the next
  19.   GOTO LOOP            value into first place, and continue until
  20.   :ALLDONE            all the files had been deleted.
  21.