2

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

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Vijay
  • 21
  • 2
  • Below is what I tried ...tf.exe label TEST1 /version:T /comment:Testing /recursive /collection:XXXX05\XXXdefaultcollection TF14064: Could not find label TEST1. – Vijay Oct 27 '14 at 12:57
  • Also I see "TFS Label Diff.exe" to get diff between 2 labels – Vijay Oct 27 '14 at 12:58

1 Answers1

4

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.

Community
  • 1
  • 1
jessehouwing
  • 106,458
  • 22
  • 256
  • 341