ÄúµÄλÖãº
Ñ°ÃÎÍøÊ×Ò³
£¾
±à³ÌÀÖÔ°
£¾
VBScript
£¾
VBScript
objects
constants
operators
statements
functions
properties
methods
All Methods
FileSystemObject Object
METHOD: FileSystemObject.CreateFolder
object.
CreateFolder
foldername
This method allows us to create a folder with the specified
foldername
. If a folder already exists with the same name as you are trying to create, you will get an error. The
FolderExists
method can be used to check this before creating you new folder.
Code:
<%
dim filesys, newfolder
set filesys=CreateObject("Scripting.FileSystemObject")
If Not filesys.FolderExists("c:\DevGuru\website\") Then
newfolder = filesys.CreateFolder "c:\DevGuru\website\"
Response.Write("A new folder '" & newfolder & "' has been created")
End If
%>
Output:
"A new folder 'c:\DevGuru\website\' has been created."