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

  1.                 FOR IN DO
  2.  
  3. FOR .. IN (..) DO is an internal command used in BATCH files or entered from
  4. the keyboard to repeat a command for each of a set of values.
  5.  
  6.     FOR %%variable IN (set) DO command      ----- when used in BATCH files
  7.     FOR %variable IN (set) DO command       ----- when entered at the keyboard
  8.  
  9. <variable> is some non-numeric character (usually a letter).
  10.  
  11. <set> can be any text string (without |, ), >, or <), a list of filenames of
  12.     the form [d:][pathname]filename[.ext], possibly with wildcards in them, or
  13.     even (in a BATCH file) environment variables. The values in <set> must be
  14.     separated by " ", ";" or tabs.
  15.  
  16. <command> is any DOS command, program, or BATCH command except FOR. Piping and
  17.     redirection may not always work as expected. FOR commands may not be
  18.     directly nested (see EXAMPLES for a way to nest them).
  19.  
  20. When a FOR command is executed, <command> is executed once for each value in 
  21. <set>, with <variable> in the command replaced by that value. 
  22.