Vijay
Vijay

Reputation: 21

TFS Labels Command line

I am trying to do the below using TFS command line TF.exe

  1. Create and Apply label to latest version of files and subfolders under a folder
  2. Compare 2 labels to find out difference between 2 labels, file names,changeset details etc

Both I'm trying to achieve through Command line

Upvotes: 2

Views: 2568

Answers (1)

jessehouwing
jessehouwing

Reputation: 114721

To create a label:

tf label "LabelName" /owner:domain\me $/Project /version:T /recursive

You need to specify the root path of your label. Which seems to be missing from your example.

For differences between two labels use:

tf diff "$/Project/Path;LlabelnameA" "$/Project/Path;LlabelnameB" /recursive /noprompt

Note that the ;... part instructs to take the Itemspec at a specific version ;L... tells it to look up the version by label. Insert the label name on the ...

Then for each file that's returned you can dig deeper.

Upvotes: 4

Related Questions