Use the detach-label command to remove labels from the specified IDs.
The syntax for this command is:
stcmd{Ex} detach-label [-p "projectSpecifier" [-pattern "pattern"][-epwdfile "filePath"] [-cmp]
[-csf] [-encrypt encryptionType]] -lbl "labelName" [-all | -type typeName |
–ifp “inputFilePath” ] [–q | -pf “filter name”] [ -ofp “output file path”]
The full syntax is:
stcmd -p "userName:password@hostName:endpoint/projectName/[viewName/][folderHierarchy/]"
For example:
stcmd -p “bsmith:rocketfive@orion:49201/StarDraw/StarDraw/SourceCode/”
The -epwdfile keyword specifies the path to the file that contains the encrypted password. Like -pwdfile , -epwdfile replaces the password being used as part of the -p or -s option, preventing others from seeing the user's password on the command line. The full syntax is: -epwdfile "filePath" .
The -pwdfile is supported for backward compatibility. Un-encrypted passwords stored using older versions of stcmd are read. However, passwords cannot be stored to files using -pwdfile anymore.
In this case, the syntax of -p or -s reduces to -p "username@hostname:port/... -epwdfile "fullyQualifiedPathToPasswordFile"".
The following is the syntax of the commands that can be used to store an encrypted password.
Use the following syntax to be prompted for the password that will be encrypted and stored in a file.
stcmd store-password -epwdfile "filePath"
stcmd store-password -epwdfile "filePath" -password "password"
After an encrypted password is stored, other stcmd commands can specify -epwdfile "filePath"' as parameters. For example:
stcmd delete-local -p "JMarsh@Orion:1024/StarDraw/StarDraw/SourceCode" -epwdfile "C:\estuff\myfile.txt" -filter "N" "*"
Compresses all the data sent between the workstation and the server and decompresses it when it arrives. Without this option, no compression takes place.
Compression speeds transmission across the network, but it takes time on the front end to compress the data and at the back end to decompress the data.
This is an optional parameter. If not specified, then the platform default is not to compress.
When the command maps the folder specified in the -p option to the underlying StarTeam folder, using -csf causes the command to differentiate StarTeam folders based on the case-sensitive spelling of their names This option does not apply to the case-sensitivity of filenames in the folders. For example, with -csf, StarTeam folders named doc and Doc are recognized as different folders. Without this option, either folder could be recognized as the doc folder.
The default is that StarTeam folders are not differentiated based on the case of letters in their names.
With or without -csf, if folder names are ambiguous, an error occurs. For example, when you use -csf, the names of two folders are ambiguous if both a Doc and doc folder exist. When you do not use -csf, folder names are ambiguous if they are spelled identically.
Encrypts all data sent between the workstation and the server and decrypts it when it arrives. Without this option, no encryption takes place. Encryption protects files, data and other project information from being read by unauthorized parties over unsecured networks.
This is an optional parameter. If not specified, then the server and the command line negotiate the encryption required by the server.
The full syntax is: -encrypt encryptionType.
The types of encryption are:
These encryption types are ordered from fastest to slowest. Each of the slower encryption types is safer than the one preceding it.
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.
Provides a file name with a fully qualified path into which to write the command output. By default, a "|" character separates each column in the output. A new line separates each row. The first row is the command name. The second row has the property names. All subsequent rows contain the data. If the file already exists, the output is appended to the end of the file.
It is possible to override the "|" character separator by specifying separator = fieldSeparator as a parameter to the connect command.
For example, separator = ;; specifies two adjacent semicolons ( ; ) as the column separator.
The item IDs are expected to be attached to the label. The detach-labels command removes them from the label.
For example, the file could be the output of a select command, such as:
stcmd select viewmemberid from file 'c:/temp/fileids.txt' where attached-label = 'x' stcmd detach-label -p… -ifp “c:/temp/fields.txt” lbl ‘x’
Using the -pattern parameter:
co -p "Administrator:Administrator@localhost:49201/project/view" -pattern "d/M/yy h:m:s" -is -o
Produces:
$Date: 28/8/15 8:34:38$