• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 508
  • Last Modified:

How do Identify local orphaned files using TFS?

I've noticed that sometimes files that used to be in TFS are no longer there, but they exist on my local drive, and this can cause problems.

We have quite a large TFS directory structure and just clicking "compare" on the root seems to take forever. Is there some simple way to get a list of files on my local drive that are no longer in TFS, or don't exist in TFS?
0
purplesoup
Asked:
purplesoup
1 Solution
 
Mohamed OsamaSenior IT ConsultantCommented:
IS this for Workspace cleanup purpose ?
if this is the case get latest & forcing overwrite will remove the orphaned files from the workspace.
also using the /preview switch with tf get will tell you see which files will be deleted from the workspace due to being no longer on TFS
more info here http://msdn.microsoft.com/en-us/library/fx7sdeyf(VS.80).aspx
there is also the below command which can prove very helpful here
tf folderdiff 
try tf folderdiff /? 
for a full list of parameters
those particular ones will do th trick
/view:SourceOnly or /view:TargetOnly
this will only show the files that are in one destination but not the other.
more info below
http://blogs.msdn.com/permanenttan/archive/2007/04/11/orcas-march-2007-ctp-folder-difference-part-2.aspx
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now