Advertisement
6_2008-2009 Files/ File Controls/ Input/ Output #209712

Create Dir (Folder)

this code creates folder with any number of subfolders beneath it. MkDir can't do this! sorry 4 my english :)

AI

AI சுருக்கம்: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

மூலக் குறியீடு
original-source
Sub CreateDir(strPath As String)
On Error Resume Next
Dim ArrFolders As Variant
ArrFolders = Split(strPath, "\")
dim i as long
Dim CurPath As String: CurPath = ArrFolders(0)
MkDir CurPath
For i = 1 To UBound(ArrFolders)
  CurPath = CurPath & "\" & ArrFolders(i)
  MkDir CurPath
Next i
On Error GoTo 0
If Len(Dir(strPath, vbDirectory)) = 0 Then
  Err.Raise vbObjectError, , "Can't create dir" & vbCrLf & strPath & vbcrlf & ":(((("
End If
End Sub
அசல் கருத்துகள் (3)
வேபேக் மெஷினிலிருந்து (Wayback Machine) மீட்டெடுக்கப்பட்டது