Appendix: Built-in Scripting Language …then the function will search the Logs directory on the specified network volume. optTagFilesFound An array (of String type) that will receive the names of the matching files. The array name must be enclosed in quotes; if it is not, then the function will try to get the contents of the array. This is an optional parameter. If no value is specified, then the file names will not be saved and the function will only return the number of files found. For more information, see "Returned value" below. Note: The array will receive only the file names and not their paths, even if you define strFile to search outside the default directory.
optNumTimeout The timeout period (in milliseconds) for the function to be successfully executed. This is an optional parameter. If no value is specified, then the project will continue searching until it has completely searched the specified directory. Returned value This function will return one of the following values: Notes This function may be called by any project client, but it is always executed on the project server. By default, it only searches the server's project folder, and if strFile includes a relative file path, then it must be relative to the that same directory.
Furthermore, because the function is executed synchronously on the project server, if strFile is poorly defined and/or optNumTimeout is not used, then the entire project — both the server and the clients — may hang while it searches for the files. Finally, optNumTimeout is not supported if the project server is a Windows Embedded device. Examples Find all text files in the Server's project folder: FindFile( "*.txt" ) Find all Microsoft Word files in the project folder and then send the names of the matching files to StringArray , within a timeout period of 1000 milliseconds: FindFile( "*.doc", "StringArray", 1000 ) FindPath Verifies whether a directory exists.
Syntax FindPath( strPathName ) strPathName The file path for which to search. InduSoft Web Studio Page 527 Value Description -1 Function timed out. 0 No matching files found. n Number of matching files found. Function Group Execution Windows Embedded Thin Client FindPath File Synchronous Supported Supported Supported