# FinalBuilder - Team Foundation Apply Label Command

**URL:** https://www.finalbuilder.com/forums/t/finalbuilder-team-foundation-apply-label-command/1967
**Category:** Discussion
**Created:** [April 10, 2012, 6:44am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-team-foundation-apply-label-command/1967 "2012-04-10T06:44:28Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![jonhillyer](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@jonhillyer](https://www.finalbuilder.com/forums/u/jonhillyer)
#### Post date: [April 10, 2012, 6:44am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-team-foundation-apply-label-command/1967/1 "2012-04-10T06:44:28Z")

</div>

I am currently using FinalBuilder 7, and want to apply a new label to my source code held in TFS.

Does anyone know what I should put in the field "Server ItemSpec"?

Regards,

Jon

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 11, 2012, 1:39am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-team-foundation-apply-label-command/1967/2 "2012-04-11T01:39:05Z")

</div>

Hi Jon,   
 Itemspec is the path to the files/folders **in source control** that you want to label. For example, $/Proj/Folder/File.txt   
  
 Cheers,   
  
 Ben

---

<div class="post-metadata">

### Author: ![jonhillyer](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@jonhillyer](https://www.finalbuilder.com/forums/u/jonhillyer)
#### Post date: [April 11, 2012, 10:31am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-team-foundation-apply-label-command/1967/3 "2012-04-11T10:31:43Z")

</div>

Thanks Ben.   
 Do I need to call some other commands as I get the error “unable to determine the source control server” when I run this?   
 The parameters/Process I’m using is…   
 - Team Foundation Create Workspace   
 - Team Foundation Map Working Folder   
 - Team Foundation Apply Label (with the following parameters)…   
 - Server itemspec = $/_._   
 - Label Name = TestLabel   
 - Label Scope = $/   
 The command line (in the build Log) says…   
 - Command line: label TestLabel@$/ “$/_._” /version:T

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [April 11, 2012, 10:49am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-team-foundation-apply-label-command/1967/4 "2012-04-11T10:49:13Z")

</div>

Hi Jon   
  
 I’m no TFS expert, but I believe this command can only work on a TFS working folder, which has the information about the server in it. I suspect you may need to map the working folder first and the apply the label. TFS is a bit strange in how some commands need the server supplied and some will only operate on a working folder.   
  
 HTH

---

<div class="post-metadata">

### Author: ![jonhillyer](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@jonhillyer](https://www.finalbuilder.com/forums/u/jonhillyer)
#### Post date: [April 11, 2012, 2:24am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-team-foundation-apply-label-command/1967/5 "2012-04-11T02:24:16Z")

</div>

Thanks Vincent, but I’m already mapping the working folder (the second command I’m running). Is this what you meant or is there another command I need to run?   
 Regards, Jon

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [April 11, 2012, 3:31am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-team-foundation-apply-label-command/1967/6 "2012-04-11T03:31:33Z")

</div>

That was it, not sure what else could be the cause… I’ll ask Ben to take a look at this again tomorrow.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 12, 2012, 1:22am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-team-foundation-apply-label-command/1967/7 "2012-04-12T01:22:18Z")

</div>

Hi Jon,   
 In the log, are you seeing the correct workspace directory? I also noticed that for some reason no username/password are being passed - do you have credentials set up either globally or for the action?   
  
 FYI, my (successful) log output is:   
  
 Workspace Directory: C:\Users\ben.OFFICE\Desktop\tfs   
 Command line: label /login:“office\ben”,_PASSWORD_ LabelingIsFun@$/ “$/_._” /version:T /recursive   
 Created label LabelingIsFun@$/   
  
 Cheers,   
  
 Ben

---

<div class="post-metadata">

### Author: ![jonhillyer](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@jonhillyer](https://www.finalbuilder.com/forums/u/jonhillyer)
#### Post date: [April 12, 2012, 12:59pm UTC](https://www.finalbuilder.com/forums/t/finalbuilder-team-foundation-apply-label-command/1967/8 "2012-04-12T12:59:43Z")

</div>

Many Thanks Ben.

For some reason even though I had set the workspace correctly, when I issued the label command it used and incorrect workspace directory.

I set the command to use the correct directory and now all&nbsp;works.

Thanks for your help.

Regards,

Jon
