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?
purplesoupAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Version Control

From novice to tech pro — start learning today.