Delete Local Folder in TFS

Tfs

Tfs Problem Overview


I'm part of a large project mapped from TFS, within that project there is a folder which I have finished working on. I don't want that folder anymore so I'd like to delete my local copy. The problem is that TFS wants to mirror the change and delete the folder from source control, I don't want to remove it from TFS.

The only way I can find to do this is to unmap the workspace, and then go through and get all the other folders I need to work on.

Is there anyway I can just delete that folder locally?

Tfs Solutions


Solution 1 - Tfs

This is an older post, but since the only given answer seems "not entirely correct" to me I'd like to answer anyway: I blogged about this (in german) here: blog.nils-andresen.de

If you have a local copy, that you want to un-get or un-download like this:

enter image description here

simply right-click the folder and then click "Get Specific Version" or "Advanced > Get Specific Version" and specify Changeset 1.

Here's why from Martin Woodward's TFS Top Tips:

> ...if you do a "Get Specific Version..." on the files, and select Changeset 1, the files will be deleted locally and the server will know this. The color of the file in the Source Control explorer will go from black to gray and will have the phrase "Not downloaded" in the latest column. > > Changeset 1 is a special changeset on your Team Foundation Server instance. It was created as part of the setup routine and only contains one thing - the root node ($/) in your source control tree. If you do a get for Changeset 1 on any actual files then they will not exist at that point in time on the system so will be deleted locally and the server will know this.

Get Specific Version - dialog

When the process is complete the "Latest"-column will show "not downloaded".

enter image description here

After that any remaining files in the filesystem can safely be removed.

Solution 2 - Tfs

You can cloak the folder in your local workspace.

> By setting the working folder status to Cloaked, you can specify that a local folder should not copy files from the server when you perform a Get operation. You might choose to do this to conserve space on your local disk. If you later decide that you need to get files in those cloaked folders, you must change the status to Active and then perform a Get operation.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJames BarrassView Question on Stackoverflow
Solution 1 - TfsNilsView Answer on Stackoverflow
Solution 2 - TfsEric JohnsonView Answer on Stackoverflow