DeleteItem method: Folder collection
Syntax
DeleteItem(FolderName)
Description
The DeleteItem method deletes the folder object identified by FolderName from the database. If the folder contains other folders, all child folders and their contents are also deleted.
WARNING:
If you delete a folder, you delete all content in the folder. If you delete a folder that contains other folders, that is, a parent folder, all the child folders, and all the content references are deleted.
Note:
The portal registry classes execute some methods "interactively", that is, as they happen. The item won't be marked for deletion, then actually deleted later. The item is deleted from the database as soon as the method is executed.
Parameters
| Parameter | Description |
|---|---|
|
FolderName |
Specify the name of a folder existing in the folder collection. |
Returns
A Boolean value: True if the folder was deleted, False otherwise.
Example
If Not &MyFolderColl.DeleteItem("MYFOLDER") Then
/* Folder not deleted. Do error checking */
End-If;