Command Line

 


Use keywords to find the content you
are looking for with in the site.

Command FOR

Function:

Perform a command for each file in the specified set of files or perform a command a given number of times.
Syntax:
FOR %variable IN ( set ) DO command

or

FOR %variable IS num1 TO num2 [STEP num3] DO command

%variableSpecifies a replaceable parameter
(set)Specifies a set of files. Wildcards can be used and file names can be separated by comma's.
num1Number specifing the start of the range.
num2Number specifing the end of the range.
num3Number specifing the increment value. The default value is 1 when no STEP value is specified.
commandSpecifies the command to be performed for each file found in the set.
Note:
  • When using the FOR command inside a batch program, use %%variable and not %variable.
  • The parameters num1, num2 and num3 may either be specified as integer or real numbers.
  • Also see Command Grouping and Batch Programs.

Copyright © 1995-2018 Lucien Cinc, All Rights Reserved
WinOne® is an Australian registered trademark

Go to the Australian Command Line Software web site.