CFindFiles:Close


The Close method closes file searching for the CFindFiles object and frees memory. It does not delete the current CFindFiles object.

Syntax

CFindFiles:Close()

Remarks

Call this method to terminate searching in a folder. If you plan to call Open more than once for this CFindFiles object, then Close must be called before Open can begin a new file search.

Example

The following script lists files inside the folder specified by the string sFolder and the filename template "h*.fts"

F = new_findfiles()

-- Create a new CFindFiles object

F:Open( sFolder, "h*.fts" )

-- specify thefolder and template

while F:Next() do

-- Iterate to the next file

  Printf("%s\r\n", F:GetPath() )

-- list the current path name

end

 

F:Close()

-- finished with this object

Related Topics

CFindFiles, Open


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.