Avery Dennison 6037 Rev. AA 3/04 Programmer Manual User Manual
Page 78

4-36 ROM-DOS Internal Commands
F O R
Batch File Command
The FOR command allows repeated execution of a ROM-DOS command
applied to a set of files.
Syntax
FOR %%variable IN (set) DO command %%variable
Remarks
During execution, this command attaches the
variable as an identifier to
each file in the
set of files described; it then applies the command to
each of these identified files. The
set may be an exact list of complete
file names or a global file specification using wildcard characters.
The FOR subcommand can be used directly on the command line and
within a batch file. To use on the command line, substitute a single
percent (%) symbol for the double percent signs (%%).
Example
s
FOR %%N IN (Q1.TXT Q2.TXT) DO PRINT %%N
Prints only the files Q1.TXT and Q2.TXT.
FOR %%N IN (*.TXT) DO PRINT %%N
Prints all files in the current default directory with a
.TXT extension.