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* Pointer to the TEXT object to be filled

Returns:

Number of strings filled.

Speed:

Slow

Remarks:

Example (lite-C):

TEXT* tDir = { strings = 30; flags = SHOW; } // empty text with 30 strings
function main() { txt_for_dir(tDir,"*.*"); // fill text with 30 file names from the current folder }

See also:

txt_load, txt_addstring

► latest version online