Delete Local Folder in TFS

tfs

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?

Best Answer

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.