CFindFiles:new
The new method creates an instance of the CFindFiles class. You must call new before using any class methods or properties. Note that this object can also be created using the new_findfiles function. The CFindFiles class iterates over files in a folder, fetching the names of files matching a template.
F = CFindFiles:new() Creates a new object. Using this constructor, you must call Open before file searching can be performed. F = CFindFiles:new( sFolder ) Opens file searching inside the named folder. The folder namemust include a complete path specification. Unless later changed by the Open method, the filename template is initialized to *.*. F = CFindFiles:new( sFolder, sTemplate ) Creates a new CFindFiles object for the specified folder using the specified file name template. The folder name is a complete path specification. |
Three overloads are provided for this method. If you use the default constructor with no arguments, then the Open method must be called to set the folder where searching is to be done. If the folder and optional template are specified in the constructor, then the Open method need not be called before calling Next.
The following script lists files inside the folder specified by the string sFolder:
|
-- Create a new CFindFiles object |
|
-- Iterate to the next file |
|
-- list the current path name |
|
|
|
-- finished with this object |
CFindFiles, delete, new_findfiles
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.