Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find a file in TFS by name or part of a name or extension

In TFS, either using Visual Studio 2019 or the web interface, what should I do to locate a file by name or part of a name or extension? I have a large repository and I need to find a specific file, but it is not practicable to open each subfolder to try to find it visually.

like image 762
user1443098 Avatar asked Oct 23 '19 17:10

user1443098


People also ask

How do I see all checked out files in TFS?

Right-click on the highest level that you want to search for checked out files (like the root of the project collection) and click the Find menu –> Find by Status. Recursive, and click Status. Click Find. This will give you a list of all the files that are checked out.

How do I map a directory in TFS?

From Visual Studio, go to the Team Explorer Connect page (Keyboard: Ctrl + 0, C) and then connect to the project. (If the project you want to open is not listed, choose Select Projects and then connect to the project.) Map the project to a folder on your dev machine. Map the workspace and get your code.


1 Answers

Updated

Since you are using TFS2013 and VS 2019 to find file without checking out the code locally.

  • Option1: Choose to install VS 2015 with TFS Power Tools and then use Find > Find by Wildcard feature
  • Option2: Upgrade your TFS server to version 2017 and above. There is a search sever/feature. Through the Code Search to search across all of your projects, find specific types of code, and easily drill down or widen your search

Workaround(not work with OP): use a wildcard directory path with TF DIR as follows:

tf dir /folders $/<PROJECT_NAME>/*Prod /recursive /collection: http://<HOST_NAME>/tfs/<COLLECTION_NAME>

Note: The command does not support wildcarding the PROJECT_NAME in the command above, if you try wildcarding the PROJECT_NAME the command will return the following response:

Sample and result for reference:

enter image description here

Without creds cached on your local machine. If you need to specify creds by adding the following argument: /login:<DOMAIN\USERNAME>,<PASSWORD>

Besides, if you already pull/map the repository in local machine with all files. You could also use a local tool or system build-in search feature to search the files.

like image 102
PatrickLu-MSFT Avatar answered Nov 01 '22 01:11

PatrickLu-MSFT