CheckPathExist
(System Library)
| Description: | This subroutine checks for the existence of the specified path. |
| Returns: | Boolean |
Usage: ![]() |
Script only. |
| Function Groups: | File I/O |
| Related to: | CheckFileExist | CopyDir |
Format: ![]() |
System.CheckPathExist(Path) |
| Parameters: |
| Path |
| Required. Any expression for the path whose existence you wish to verify. |
| Comments: | This subroutine checks for the existence of the path specified in Path. It returns 1 if the specified path exists, or 0 if the specified path does not exist. |
This function is session non-aware, meaning it works on the server's file system even with an active remote connection established.This function is also blocking. All concurrent thread operations will be paused until its execution has concluded. Avoid using this function to access a network file path ("\\server1\share\file.txt", for example). If the network location is unavailable while a blocking File I/O function is attempted, it will block indefinitely. It is recommended that a target file be copied to the local file system for access rather than over the network from VTScada.
Example:
If Watch(1);
[
{ check whether the path exists... }
IfThen(System.CheckPathExist(SomePath),
...
