CFindFiles:Open
The Open method specifies the folder name and the filename template for the CFindFiles object.
CFindFiles:Open( sFolder ) CFindFiles:Open( sFolder, sTemplate="*.*" ) where sFolder is the name of the folder to be searched. sTemplate is a wildcard template for files to be found. |
Call this method to setup the searching before beginning to iterate using Next. This method can be disregarded if the folder and template are specified in the new constructor. You can also specify different folders or templates using this method repeatedly for the same object, but be sure to call Close after finishing each search procedure, before calling the next Open.
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 |