ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods







METHOD:  Folders Collection.Add

object.Add ("foldername")

This method is used to add a new Folder to a Folders collection. Note that, if the ("foldername") already exists, you will get an error.

<%
Code:
Dim filesys, demofolder, folcoll
Set filesys = CreateObject("Scripting.FileSystemObject")
Set demofolder = filesys.GetFolder("foldername")
Set folcoll = demofolder.SubFolders
folcoll.Add("foldername")
%>