Narayanan
Narayanan

Reputation: 3920

How can I get labels of a sub folder under a team project using command line tool TF.exe?

We have TFS version control in which the following folder structure is adopted.

The following is the folder structure that we use:

enter image description here

In the above image, delta is the TFS server name, TempProjects is the project collection and DetBarShapeEngine is one of the team project. Main is the branch name and ProjectSource is a special folder under which all files managed by development team are stored. We label at the ProjectSource level and hence it is a kind of root folder for every project source.

When I ran tf labels /collection:"https://delta:443/tfs/TempProjects" /owner:*, I saw a huge list of labels from all the project collections including DetBarShapeEngine.

I modified the above command line to include the team project in the project collection URL tf labels /collection:"https://delta:443/tfs/TempProjects/DetBarShapeEngine" /owner:*, I receive:

TF31002: Unable to connect to this Team Foundation Server .... .... Technical information (for administrator): The remote server returned an error: (404) Not Found.

I tried increasing the depth of the path of the project collection URL till ProjectSource, but I still get the same 404 error.

Question: How do I get labels of a sub folder under a team project?

Note:

  1. I cannot change this folder structure for any reason what so ever.
  2. We use TFS 2013.

Upvotes: 0

Views: 545

Answers (1)

Narayanan
Narayanan

Reputation: 3920

After struggling a lot, I stumbled on a blog showing sample about using scope in some other command. I tried to use that scope string to TF labels command and it was a success!

Here is the command line that I used:

tf labels /collection:"https://delta:443/tfs/CadsProjects" *@$/DetBarShapeEngine/Main/ProjectSource /owner:* 

Upvotes: 1

Related Questions