txt_for_dir(text,STRING* name)

Reads all file names that match the given string into separate strings of a text object. This instruction can be used to scan a folder.

Parameters:

name file names (C-style with wildcards) to be matched.
text TEXT object to be filled

Returns:

Number of strings filled.

Speed:

Slow

Remarks:

Example:

TEXT tDir = { strings = 10; } // empty text with a lot of strings
...
txt_for_dir(tDir,"*.txt"); // fill file names into the text strings
tDir.visible = on;

See also:

txt_load