Promotic
WikipediaLinkedInYoutubeTwitterFacebook

DirExist - method of object Pm

Description:
Tests if the folder (directory) exists.
Syntax:
DirExist(sDir As String) As Boolean
Calling:
b = Pm.DirExist(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 Values:
Returns true if the folder/disk exists, otherwise it returns false.
Note:
If a relative path is entered, then it refers to the folder of the running application.
 
This method is not functional for Web panels in JavaScript language (and therefore it is not working in Web panels).
Example1:
VBScriptSelect and copy to clipboard

Dim bExist
bExist = Pm.DirExist("c:\proj\")
If bExist Then
  '...folder 'c:\proj\' exists
End If
Example2:
VBScriptSelect and copy to clipboard

Dim bExist
bExist = Pm.DirExist("c:\")
If bExist Then
  '...disk 'c:\' exists
End If
PROMOTIC 8.3.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.Tavičská 845/21 703 00 Ostrava-Vítkovice