|
FindFirstFile |
Top Previous Next |
|
FindFirstFile
Syntax FindFirstFile([in] FolderName, [in] Extension, [out] FileNameVar);
Description To retrieve the first file in a specific folder. FindFirstFile is normally followed by FindNextFile which continue the search for subsequent file.
Parameters FolderName The folder name to be scanned. Extension The file extension filter. Pass * for all files. FileNameVar The name of the variable to receive the return file name.
Return 1 = success 0 = failed -1 = FSCommands cannot be found
Example
FSCommand("FindFirstFile", "C:\\Data,*,FileNameVar");
This will scan folder C:\Data for all file extension. The first file found will be returned in _root.FileNameVar variable upon completion of this FSCommand call.
You can use an escape character ~ (tilda) to insert a comma into a file path. |