File Series Generator


File Series

The object is used in combination with file input / output objects to process multiple files. It generates file names that contain a numbered extension . The first part of the file name is specified via the "File name" property. If for example the first part is "hugo", the generated file names are "hugo.0", "hugo.1", ...

The object has 3 modes of operation. The mode is specified via the "Type" property:

Existing
The file name generation starts at zero. The object tests whether the generated file name exists. The output variable "Ok" returns 1 if the file exists, 0 otherwise. Upon each call of the object's standard action the number is increased.
Append
On the first call generated file names are tested whether corresponding files exist. The first file name that has not been found is returned. On each succeeding call the the returned file number is increased.
Overwrite
The file name generation starts at zero. No checks are done whether the generated file name exists. On each call the file number is increased.

Besides the standard action two more actions exist: When calling the "Reset" action the object is resetted to the state as if execution was just started. When the "Back" action is called, the internal counter is decreased and a file name is generated. If the generated file name would have a negative number, the "Ok" output variable is set to zero and a file name with a zero number is returned. Otherwise the "Ok" output variable is always 1 on "Back" action. This action is especially useful in combination with the "Existing" mode. When connecting "Back" and "Forth" buttons with the "Back" and "Standard" actions, it can be used for stepping through existing files.


The Vimms User Manual