Option Explicit
Private Function CreateDir(strDir As String) As Boolean
On Error Resume Next
Dim s() As String
s = Split(strDir, "\")
Dim i As Integer
For i = 1 To UBound(s)
s(0) = s(0) & "\" & s(i)
MkDir s(0)
Next
End Function
'contoh penggunaan fungsi di atas
Private Sub Command1_Click()
CreateDir "C:\test1\test2\test3\test4 dan test5\test6\test7 dan test8"
End Sub
Friday, June 8, 2012
Cara Membuat Direktori lebih dari 1 level - (Pengelolaan Fil
Labels:
File-And-Folder