home *** CD-ROM | disk | FTP | other *** search
- FOR IN DO
-
- FOR .. IN (..) DO is an internal command used in BATCH files or entered from
- the keyboard to repeat a command for each of a set of values.
-
- FOR %%variable IN (set) DO command ----- when used in BATCH files
- FOR %variable IN (set) DO command ----- when entered at the keyboard
-
- <variable> is some non-numeric character (usually a letter).
-
- <set> can be any text string (without |, ), >, or <), a list of filenames of
- the form [d:][pathname]filename[.ext], possibly with wildcards in them, or
- even (in a BATCH file) environment variables. The values in <set> must be
- separated by " ", ";" or tabs.
-
- <command> is any DOS command, program, or BATCH command except FOR. Piping and
- redirection may not always work as expected. FOR commands may not be
- directly nested (see EXAMPLES for a way to nest them).
-
- When a FOR command is executed, <command> is executed once for each value in
- <set>, with <variable> in the command replaced by that value.