FileSystemObject : CreateFolder Method


This function creates a Folder.

Format : 

objectOfFileSystemObject. CreateFolder(foldername)

  • objectOfFileSystemObjectAs the names says, it’s a FileSystemObject.
  • foldername
    • Mandatory
    • Type:     String
    • Folder will be created with the same name what you will pass here.

Function FnCreateFolder(strCompleteFolderPath)
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set objFolder = fso. CreateFolder(strCompleteFolderPath)
End Function

Call FnCreateFolder (“c:\New Folder”)


Leave a Comment