beautypg.com

Avery Dennison 6035 Programmer Manual Rev.A 7/98 User Manual

Page 119

background image

7/9/98

ROM-DOS 6.22 Command Descriptions 3-61

F O R B a t c h S u b c o m m a n d

Internal

Purpose

Allows repeated execution of a ROM-DOS command applied to a set of
files.

Syntax

FOR %%variable IN (set) DO command %%variable

Remarks

In 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 as
well as within a batch file. To use on the command line, substitute a
single percent (%) symbol for the double percent signs (%%).

Examples

FOR %%N IN (Q1.TXT Q2.TXT) DOPRINT %%N

Prints only the files Q1.TXT and Q2.TXT.

FOR %%N IN (*.TXT) DO PRINT %%N

Print all files, in the current default directory, with a .TXT extension.