How to delete / rename / move top-level folder in TFS source control beta 3

How do I delete a top level folder inside a project in source control?

For example, if I want to delete the folder "bar" in the project "foo", how can I remove a folder once it has been created?

Can I rename "bar" to something else, like "oranges"?

Can I move "bar" to some other folder in the tree?

[305 byte] By [barton] at [2007-12-17]
# 1
First, to clarify the term - there are traditional VS projects (C# project, VB project, etc.) and with Team Foundation there are now Team Projects. Given the question, I take it you mean team projects (as created with the "New Team Project" option and going through the Project Creation Wizard).

When you create a team project called "foo", the folder for that project (assuming you had it create a folder during the Project Creation Wizard, which is the default) will be called $/foo. Based on your question, I take it you're referring to a folder called "bar" that would be at server path $/foo/bar since it's part of the "foo" team project.

The easiest way to rename or delete such a folder would be to bring up the Source Control Explorer (View | Other Windows | Source Control Explorer) and navigate to that folder. You'll want to make sure that you have the folder in your local workspace (this is a limitation when have in V1) so you may want to right-click on "bar" and do a "get latest version" first. If you don't already have it mapped, you'll be prompt to pick a local path to map it to.

When you right-click on the folder "bar" (once you have it in your workspace), among the entries in the context menu will be Delete, Rename (for the "rename to oranges" case), and Move (for "move it to another folder"). Note that each of these pends the operation on the workspace, and you'll need to check in before the change is committed to source control.

tiny screen shot: http://static.flickr.com/29/55040912_e3190835e6.jpg

JamesManningMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 2

Hi Barton:

A Team Project which are the top level folders beneath root ($) cannot be renamed or deleted in V1.

Now from the example you listed, it seems that you want to rename/delete a folder that is underneath Team Project Foo and this you can do from the Source Control Explorer by using either the Rename or Move commands depending what you want to achieve. Right click on the folder and see the context sensitive information for a list of actions you can take.

Thanks,
mario

MarioRodriguez at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 3

Regarding deleting a top level folder, what Mario means is that you cannot delete it from within VS. You can use tfsdeleteproject.exe to delete a team project and its associated top-level folder in source control.

Buck

BuckHodges at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 4
Ah, but here is the rub - tfsdeleteproject.exe does not always work:

http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=115486

barton at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 5
i have Create Folder, Delete, Move... grayed out. Operating as root admin.
TFS b3

what should i do?

P.S. When do you plan to release RTM of TFS?

dkmsdn at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 6
The only way to delete a top level "Team Project" folder is with TFSDeleteProject. We will be releasing TFS in Q1 of '06 - just a few months away. We currently think we'll be having a Release candidate around the first of the year.

Brian

BrianHarry at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...

Visual Studio Team System

Site Classified