Folder::Rename

Description

Rename a folder

Syntax

BOOL Rename( LPCSTR strName )

Parameters

strName
[input] New name for folder

Return

TRUE on success, FALSE on failure

Examples

EX1

// Rename a folder
void    Folder_Rename_Ex1()
{
    Folder fld = Project.ActiveFolder();
    BOOL bVal = fld.Rename("Example");
    string strName = fld.GetName();
    if(bVal)
        printf("Folder renamed to %s\n", strName);
    else
        printf("Rename failed\n");
}

Remark

Rename the folder. If the new folder name is used by a sibling folder then this function will return FALSE.

See Also

header to Include

origin.h