Open In App

ASP CreateFolder() Method

Last Updated : 11 Feb, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

The ASP CreateFolder Method is used to create a new directory or folder in the Server. It is a predefined method of the FileSystem Object. It accepts the name of the folder as a parameter.

Syntax:

FileSystemObject.CreateFolder( name ) 

Parameter Values: This method accepts a single parameter as mentioned above and described below:

  • name: It specifies the name of the folder that has to be newly created. It is a required parameter.

Example Code: This example creates a new folder named “hello” by using the CreateFolder() method.




<%
dim fs,f
set fs = Server.CreateObject("Scripting.FileSystemObject")
set f = fs.CreateFolder("d:\hello")
set f = nothing
set fs = nothing
%>



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads