Microsoft® Visual Basic® Scripting Edition
CreateFolder Method
 Scripting Run-Time Reference 
Version 3 

See Also                   Applies To


Description
Creates a folder.
Syntax
object.CreateFolder(foldername)

The CreateFolder method has these parts:

Part Description
object Required. Always the name of a FileSystemObject.
foldername Required. String expression that identifies the folder to create.

Remarks
An error occurs if the specified folder already exists.

The following example illustrates use of the CreateFolder method:

Function CreateFolderDemo
  Dim fso, f
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set f = fso.CreateFolder("c:\New Folder")
  CreateFolderDemo = f.Path
End Function