TFS: Search for a file by name in source control

Manuel Zelenka picture Manuel Zelenka · Nov 6, 2012 · Viewed 53.6k times · Source

I can't find a file in our source control of the TFS because it's simply a big mess. So I want to know if there is a way to search for files by their name?

I've heard of the Power Tool for TFS which enables search functionality but the problem is that it has to be installed and our sysadmin is currently not available. So does maybe a simple plugin exist?

Answer

Webplanet TFS Consulting picture Webplanet TFS Consulting · Nov 6, 2012

If you are using Visual Studio 2010

  • Right click on your collection or team project
  • Select 'Find in source control'
  • Then select 'status' or 'wildcard'
  • You can search for your files there

The following will list all the items in your repository without checking them out

tf Dir command

tf dir /recursive $/

you can pass in the item you are searching for also e.g.

tf dir /recursive $/*.cs

gets all the .cs files in all team projects

Note: depending on how big your source is, this could take sometime.