2.2.4.13.22 Folder::RemoveSubFolder

Description

Delete a subfolder by name

Syntax

BOOL RemoveSubFolder( LPCSTR lpcszSubFolderName, BOOL bFolderPrompt = FALSE, BOOL bPagePrompt = FALSE )

Parameters

lpcszSubFolderName
[input] Name of folder to delete
bFolderPrompt
[input] Prompt user for folder deletion confirmation ( default = No | FALSE )
bPagePrompt
[input] Prompt user for deletion of pages within folder confirmation ( default = No | FALSE )

Return

TRUE on success, FALSE on failure

Examples

EX1

// Remove all subfolders in a project
// WARNING! DESTRUCTIVE EXAMPLE
void    Folder_RemoveSubFolder()
{
    Folder fld = Project.RootFolder;
    Folder subfld;
    foreach(subfld in fld.Subfolders)
    {
        printf("Returned %u\n", fld.RemoveSubFolder(subfld.GetName()));
    }
}

Remark

Remove the subfolder with the name specified in lpcszSubFolderName.

If bFolderPrompt or bPagePrompt is TRUE then Origin will prompt the user to verify.

See Also

Header to Include

origin.h