Sunday, March 18, 2012

Lotus script function for creating folder at local computer

//*********Function for creation of folder at local computer***************//

Function CheckMakeFolder ( root As String , leaf As String, subleaf As String) As String
    Dim strPath As String
    Dim strPath1 As String
    strPath = root & "\" & leaf
    'MsgBox (strpath)
    If Not DirExists (strPath) Then
        MkDir strPath
    End If
   
    strPath1 = strPath & "\" & subleaf
   
    If Not DirExists (strPath1) Then
        MkDir strPath1
    End If
   
       
    'End If
    CheckMakeFolder = strPath1
   
End Function
 
//******Function for validating the Directories from Local computer****************//

Function DirExists (strPath As String) As Boolean  
DirExists = (Dir$ (strPath ,16 ) <> "" )
    'MsgBox(DirExists)
End Function

3 comments: