File Iterator


File iterator

Iterates over files that match a given pattern. This pattern may contain wildcards like '*'.  The pattern is specified via the property "Filespec".  The first time the object is executed, the file system is searched that match the given pattern. If property "Recursive" is set to "Yes", subdirectories are also scanned.  Whether the scan should follow symbolic links can be specified in the "Follow symlinks" property.

On return,  the output variable "Count" contains the number of files that were found. Output variables "Filename", "FullPath" and "Directory" are set corresponding to the first file that was found. The list of files that were found is kept in an internal memory of the file iterator object. On subsequent executions of this object the other files are returned. The output variable "Again" indicates whether more files are found and can be used in connection with a Yes object to create a loop that iterates over all found files.

If the property "Want dirs" is set to yes, also directory entries are returned. The output variable "Is Directory" returns 1 if "Filename" belongs to a directory entry and 0 otherwise.


The Vimms User Manual