How do I use mkdir in a function? LotusScript mkdir. Create directory. Create folder.
How do I use mkdir in a function? LotusScript mkdir. Create directory. Create folder.
| Answer | Public Function CreateDir(Byval sDirName As String) As Boolean
On Error Goto errorHandler
Const ATTR_DIRECTORY = 16
sDirName = Trim(sDirName)
If Trim(Dir(sDirName,DIRECTORY ))="" Then
Mkdir(sDirName )
CreateDir = True
Else
CreateDir = False
End If
Exit Function
errorHandler:
CreateDir = False
Exit Function
End Function
Overview of MKDIR: Creates a directory.
Syntax: MkDir path
Elements: path
A string expression whose value is the name of the directory you want to create.
Usage: A drive letter in path is optional. If it is not included, the current drive is used. Relative pathnames may also be used.
Use the path syntax for the platform on which you are running LotusScript. The maximum allowable length of the path string varies with the platform.
LotusScript generates an error if the directory cannot be created. the function above shows an example fo howe to use the mkdire function. |
| Attachments | -none- |
| Applies to versions | 4.x; 5.x; 6.x |
| FAQ Provided By | Steven Charles Robinson |
| Credit | |
 |  |
|
|