CFindFiles:Next
The Next method returns the next file name inside the folder, matching the filename template.
sFileName = CFindFiles:Next() where sFileName is the returned path string for the file. When the list is exhausted, nil is returned. |
This method iterates to the next file in the folder. If another file is found, the full path spec is returned. If no more files exist matching the template, nil is returned. The search must have been initialized using the new or Open method before calling Next. After Next returns, the file's path spec may be obtained from the return value or by calling the CFindFiles:GetPath method.
The following script lists files inside the folder specified by the string sFolder and the filename template "h*.fts"
|
-- Create a new CFindFiles object |
|
-- specify thefolder and template |
|
-- Iterate to the next file |
|
-- list the current path name |
|
|
|
-- finished with this object |