CFindFiles:GetPath
The GetPath method returns the filename obtained by the Next method. This method simply accesses the string saved by the last call to Next.
sFileName = CFindFiles:GetPath() sFileName is the full path spec from the last call to Next. |
This method simply accesses the static string where the file name was stored by the last call to Next. It is useful in iterating through a folder, as shown in the example below.
The following script lists files inside the folder specified by the string sFolder and the filename template "h*.fts". Notice that F:Next() returns nil and terminates the loop before F:GetPath() is called after the last file has been processed.
|
-- Create a new CFindFiles object |
|
-- specify thefolder and template |
|
-- Iterate to the next file |
|
-- list the current path name |
|
|
|
-- finished with this object |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.