Promotic

DirExist - method of the Pm object

Description:
Test the existence of file folder.
Syntax:
Boolean DirExist(String sDir)
Parameters:
sDir(String) Relative or absolute path and folder name.
It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files and folders.
Return value:
Returns the true value if the folder/disk exists,
otherwise it returns the false value.
Note:
If a relative path is entered, then it refers to the folder of the running application.

This method is not functional in Web panels.
Example1:
JavaScriptVBScriptSelect and copy to clipboard

var bExist = Pm.DirExist("C:\\\\Promotic\\\\Apps\\\\Application1\\\\");
if (bExist)
{
// ...folder 'C:\Promotic\Apps\Application1\' exists
}
Example2:
JavaScriptVBScriptSelect and copy to clipboard

var bExist = Pm.DirExist("C:\\\\");
if (bExist)
{
// ...disk 'C:\' exists
}
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- DirExist
 
 
- E
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r.o.