Renaming folders that are explicitly mapped

Buck Hodges

Internally, someone wanted to rename a folder and received an error instead of having the folder moved.  When trying to rename $/ProjectA/Folder1 to $/ProjectB/Folder1, the user received the error message, “TF14097: Cannot rename $ProjectA/Folder1 when it has a working folder mapping assigned to it.”

If you run into that, here’s what it means.

The system does not allow you to rename an item that is explicitly mapped.  If you bring up your workspace mappings (File -> Source Control -> Workspaces, select your workspace, and click Edit), you will see that $/ProjectA/Folder1 is listed in the mappings.  An item is mapped explicitly if you see it listed in the dialog.  An item is mapped implicitly if it’s mapped because one of its parents is listed in the mappings in the dialog.

To rename the folder, you will need to change the mapping to map the parent, $/ProjectA, instead.  For the best experience, you may want to map $/ProjectB as well, though it is not required.

For example, if you have $/ProjectA/Folder1 mapped to c:projectsprojectAFolder1, you could map $/ProjectA to c:projectsprojectA.  Then you would be allowed to rename $/ProjectA/Folder1 to $/ProjectB/Folder1.

After you have renamed the folder, you can change the mappings back to their original settings, if you like.


Leave a comment

Feedback usabilla icon