|
Loop Files Action |
Declaration |
<AMLOOPFILES FOLDER="text" RESULTVARIABLE="text
[variable]"> |
See Also |
Loop, End Loop, Loop Windows, Loop Processes, Loop Expression, Loop Dataset, Loop List, Break |
Loops through the filenames contained in the folder specified. The variable specified in the Index parameter is updated with the current filename. With each successive loop, the next filename is retrieved. The loop ends after all the filenames have been retrieved or when a Break is encountered.
To perform an action on every file in a folder.
Specifies the folder that should be scanned for files.
Specifies an already created variable name that should be populated with the next filename on each successive loop.
Standard Error Handling Options
This action also includes the standard "Error Causes" and "On
Error" failure handling options/tabs
More on Error Handling Options
Variables and Expressions
All text fields allow the use of expressions by surrounding the expression
in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help
construct these expressions, a popup expression builder is available in
all these fields by pressing F2.
More on variables...
More on expressions...
More on the expression builder...
<AMVARIABLE NAME="currentfile" VALUE="" DESCRIPTION="">
<AMLOOPFILES FOLDER="C:\temp" RESULTVARIABLE="currentfile">
<AMMESSAGEBOX MESSAGETEXT="The current file is %currentfile%">
</AMLOOP>