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

    Question

  • 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?

    Saturday, October 22, 2005 9:19 PM

Answers

  • 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
    Sunday, October 23, 2005 1:25 AM
    Moderator

All replies

  • 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
    Sunday, October 23, 2005 1:25 AM
    Moderator
  • 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

    Monday, October 24, 2005 3:05 PM
  • 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

    Tuesday, October 25, 2005 12:19 AM
    Moderator
  • Ah, but here is the rub - tfsdeleteproject.exe does not always work:

    http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=115486
    Saturday, October 29, 2005 4:20 AM
  • 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?
    Thursday, November 03, 2005 8:56 AM
  • 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
    Thursday, November 03, 2005 11:39 PM
  •  dkmsdn -

    i have Create Folder, Delete, Move... grayed out. Operating as root admin.
    TFS b3

    what should i do?




    You need get run "Get Latest Version" of the file first. You cannot make a "change" to the files (delete, rename, move, etc) if they are not "gotten" first.                                                  

    mjlarezzo | Measure twice, cut once
    • Proposed as answer by PCfromDC Friday, October 28, 2011 2:03 PM
    • Unproposed as answer by PCfromDC Friday, October 28, 2011 2:03 PM
    Thursday, November 06, 2008 8:41 PM