Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

CreateFolder Method

Updated: August 2009

Creates a folder.

object.CreateFolder(foldername)

object

Required. Always the name of a FileSystemObject.

foldername

Required. String expression that identifies the folder to create.

An error occurs if the specified folder already exists.

The CreateFolder method returns a Folder object.

The following code illustrates how to use the CreateFolder method to create a folder.

var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateFolder("c:\\new folder");

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

Date

History

Reason

August 2009

Specified the returned object.

Customer feedback.

Community Additions

Show:
© 2015 Microsoft