Submitted By: Dave Kalata

This script creates a folder in the current directory.

Visual Basic
Edit|Remove
Set objFSO = CreateObject("Scripting.FileSystemObject")
CreateDir "Scripts"

Sub CreateDir(Dir)
  Dim TempDir, i
  On Error Resume Next
  If Not objFSO.FolderExists(Dir) Then
    For i = 1 to Len(Dir)
      If Mid(Dir,i,1) = "\" Then objFSO.CreateFolder(TempDir)
      TempDir = TempDir & Mid(Dir,i,1)
    Next
  End If
  objFSO.CreateFolder(Dir)
End Sub