MkDir
(Engine-Level Function)
Description: | Create a new folder (directory) and returns its own error code. |
Returns: | Numeric |
Usage: | Script Only. |
Function Groups: | File I/O |
Related to: | RmDir |
Format: | MkDir(Name) |
Parameters: |
Name |
Required. Any text expression which is the full path name of the directory to create. A known path Known Path Aliases for File-Related Functions for File-Related Functions may be provided in the form, :{KnownPathAlias}. |
Comments: | The return value is as follows
In VTS version 7.0 and later, MkDir can now create directories recursively, so that MkDir("C:\one\two\three"); will create directory one (if it does not already exist), then create directory two (if it does not already exist), and then finally create directory three (if it does not already exist). If Name is given as a relative path, it will be created below the VTScada installation directory. |
Example 1:
err = MkDir("C:\SAMPLE");
This creates the directory Sample on drive C.
Example 2:
err = MkDir("SAMPLE");
This creates the directory C:\VTScada\SAMPLE