September 2001
Beginner
528 pages
11h 59m
English
To add a new folder to the Web, use the WebFolders collection's Add method. The syntax is
obj.Add(FolderURL)
Obj is a reference to a WebFolders collection. FolderURL is the absolute path or URL of the new folder. The following code adds the folder named c:\myweb\images to the Web:
ActiveWeb.RootFolder.Folders.Open("c:/myweb/images")
If you do not specify a path for the folder, it is created relative to the Web's root folder. For example, if c:\myweb is the active Web's root folder, then the code that follows has the same effect as the previous example:
ActiveWeb.RootFolder.Folders.Add("images")
To delete a folder, use the WebFolders collection's Delete method:
obj.Delete(index)
Obj is a reference to a WebFolders
Read now
Unlock full access