Use the detach-label command to remove labels from the specified IDs.
The syntax for this command is:
detach-label [-p "projectSpecifier" [-pwdfile "filePath"] [-cmp]
[-csf] [-encrypt encryptionType]] -lbl "labelName" [-all | -type typeName |
-ifp "inputFilePath" ] [-q | -pf "filter name"] [ -ofp "output file path"]
-ifp Specifies a fully qualified path to a file which contains a list of item IDs. The items associated
with item IDs are associated to the label. If -ifp is specified, -filter "fileStatus"
cannot be specified.
-lbl Specifies the label name on which to perform the action. This option can be used more than
once. The application action is for all of the labels on the specified file or revisions.
-all Specifies that the label will be detached from all items it is attached to.
-type Specifies that the label will be detached from all items of the specific type that it is attached
Important: -all, -type, -ifp are mutually exclusive. You must specify just one of them. An
exception will be thrown if there are none or more than one specified.
The item IDs are expected to be attached to the label. The detach-labels command removes them from
For example, the file could be the output of a select command, such as:
stcmd select viewmemberid from file 'c:/temp/fileids.txt' where attachedlabel
stcmd detach-label -p... -ifp "c:/temp/fields.txt" lbl 'x'