Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Scripting
Script Runtime
FileSystemObject
 CreateFolder Method

  Switch on low bandwidth view
This page is specific to
.NET Framework 3.0

Other versions are also available for the following:
Scripting Runtime Library
CreateFolder Method

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 following code illustrates how to use the CreateFolder method to create a folder.

JScript
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

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker