# Starteam ST Apply Label action

**URL:** https://www.finalbuilder.com/forums/t/starteam-st-apply-label-action/316
**Category:** Discussion
**Created:** [January 17, 2007, 12:20pm UTC](https://www.finalbuilder.com/forums/t/starteam-st-apply-label-action/316 "2007-01-17T12:20:31Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sprieto](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/7ab992/32.png) [@sprieto](https://www.finalbuilder.com/forums/u/sprieto)
#### Post date: [January 17, 2007, 12:20pm UTC](https://www.finalbuilder.com/forums/t/starteam-st-apply-label-action/316/1 "2007-01-17T12:20:31Z")

</div>

I have a FinalBuilder project that create a Label in starteam and after, apply the label to a subfolder of the starteam project.  
  
It runs correctly but I was unable to apply the revision label to the folder itself.\<  
  
How is the configuration of the _ST Apply Label_ Action, to apply the label to the folder too?  
  
Thank you.

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [January 17, 2007, 11:49am UTC](https://www.finalbuilder.com/forums/t/starteam-st-apply-label-action/316/2 "2007-01-17T11:49:56Z")

</div>

Hi Santiago,  
  
The FinalBuilder apply label action uses the “apply-label” command line option of stcmd.exe  
  
I’m not a StarTeam expert, but I thought you’d be able to apply the label to a folder by specifying the folder hierarchy and \* in the filespec. I’m not sure on this though - if you’re able to tell me the exact command that you need to call stcmd.exe with, I can make sure the action supports this.  
  
cheers,  
tate.

---

<div class="post-metadata">

### Author: ![sprieto](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/7ab992/32.png) [@sprieto](https://www.finalbuilder.com/forums/u/sprieto)
#### Post date: [January 18, 2007, 8:20am UTC](https://www.finalbuilder.com/forums/t/starteam-st-apply-label-action/316/3 "2007-01-18T08:20:26Z")

</div>

Hi Tate,  
  
Thanks for your reply.  
  
I think that was one of the test I made, but i’m not sure.  
  
This is the command that I’m running in the project:

Running StarTeam with command line : apply-label -is -filter “CO” -lbl “Version 0.0.0.4” -p "Builder:\*\*\*\*\*_@STSERVER:49201/MyProject/MyProjectRootFolder//SubFolder\_1/SubFolder\_2" -x -stop "_"  

  
With this command, all the files in _Subfolder\_2_ are labeled with the label, but not the folder.   
In Starteam interface, when you apply a label to folder, the dialog shows three options, as you can see in attached image.  
Any idea?  
  
Thanks in advance,

Santi.

![STAttachLabel.PNG](https://www.finalbuilder.com/forums/uploads/default/original/1X/b8dcccb50f35496eb0140a3c1b7a66ca34a3426b.png)

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [January 18, 2007, 12:36pm UTC](https://www.finalbuilder.com/forums/t/starteam-st-apply-label-action/316/4 "2007-01-18T12:36:38Z")

</div>

can you try running that same command line manually but without the “\*” at the end and see if that works?

---

<div class="post-metadata">

### Author: ![sprieto](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/7ab992/32.png) [@sprieto](https://www.finalbuilder.com/forums/u/sprieto)
#### Post date: [January 18, 2007, 1:36am UTC](https://www.finalbuilder.com/forums/t/starteam-st-apply-label-action/316/5 "2007-01-18T01:36:15Z")

</div>

I’ve do it with the same result; the label is only applied to files, not folders.  
I’ve tried some variations too, like apply label from SubFolder\_1, changing the filter, …, but the result is always the same.  
  
Regards,  
Santi.

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [January 19, 2007, 12:34pm UTC](https://www.finalbuilder.com/forums/t/starteam-st-apply-label-action/316/6 "2007-01-19T12:34:01Z")

</div>

Hi Santi,  
  
It looks like you need to create a “Build Label” (with the Create Label action) and when you apply that it will apply to the folder too. I’m guessing here though - maybe it’s best to ask a StarTeam expert?  
  
[http://info.borland.com/techpubs/starteam/2005R2/en/user.pdf](http://info.borland.com/techpubs/starteam/2005R2/en/user.pdf)  
  
If you have a look on page 309 in that pdf file it describes the -b option on the create label command as:  
  
Specifies that the new label is a build label. Without either -b or  
-r, the label is a view label. View labels (and a build label is a  
special type of view label) are immediately and automatically  
applied to every folder, file, change request, task, and topic in  
the view.  
  
So, maybe experiment a bit with the type of label you create and see if you can get something going.  
  
hth.  
.t8
