Use the move command to move StarTeam items. You can use this command to move all item types: Folder, File, Change request, Task, Topic, Requirement, Sprint, Story, Concept, WhiteBoard, and custom components.
The syntax for this command is:
stcmd move –p “user:pwd@host:port/project/view” [ -epwdfile “pathToPasswordFile” ] [ -csf ] –type “typeName” –id itemID [ -tp targetProjectName ] [ –tv “targetViewName” ] [ -tfp “target folder 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.
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.
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.
Overrides the specified StarTeam folder’s working folder or working directory. This is equivalent to setting an alternate working path for the folder.
While this option allows you to use a different working folder than the one specified by the StarTeam view, its critical importance is to provide cross-platform compatibility. For example, UNIX and Microsoft Windows systems specify drive and directory path names in incompatible ways.
While the path D:\MYPRODUCT\DEVELOPMENT\SOURCE is understood on a Microsoft Windows platform, it is not understood on a UNIX platform. Use this option to define the working path if your platform does not understand the path specified in the StarTeam project.
A backslash (\) is interpreted as an escape character when it precedes quotation marks. As a result, an error occurs in the following example:
stcmd ci -p "xxx" -fp "C:\" "*"
which is interpreted as:
stcmd ci -p "xxx" -fp "C:" *"
To avoid a situation like this, escape the final character in "C:\" as follows:
stcmd ci -p "xxx" -fp "C:\\" "*"
Or avoid it as follows when the -rp path doesn’t end with the root folder as in C:\orion\:
stcmd ci -p "xxx" -fp "C:\orion" "*"
The full syntax is: -rp "folderName".
Folder is the Microsoft Windows term and appears in the StarTeam user interface. Directory is the correct term for the UNIX platform.
Specifies the unique item (view member) ID of the item. Look in the property lists of the CPC or query using the select command to find the View Member IDs. -id can also specify the primary descriptor of the item; e.g. file name, folder name, change request number.
Describes an optional specific target project into which to move. If not specified, then the item will be moved into the source view described by -tv, assuming that is specified. If neither is specified, then the move will occur into the original view as specified by -p.
If -tp is specified, and -tv is not, then the move will occur into the default (root) view of the project described by -tp.
Describes the folder path to which to move. If a folder name is specified, then this name must be unique across the folder tree. Otherwise, a fully qualified folder path is required, starting from the root folder of the view down to the leaf folder into which the move must be created.
If -tfp is not specified, then the move will be created in the root folder of the target view - tv.
Note also that if a share of the item already exists in the target folder, then the move will not occur. An error is returned.
Note that either one of -tp, -tv or -tfp must be specified.
The move command returns no results.
The following finds FolderX in project AProject, view AProject, under the folder hierarchy AProject/ChildFolder and moves it to project StarDraw, view Release 1.0 Maintenance, as a child folder to Documents/Images:
stcmd move –p “Administrator:Administrator@localhost:49201/StarDraw/Release 1.0 Maintenance/Documents/Images” –type Folder –fp “AProject/AProject/ChildFolder/FolderX”
The following finds the first occurrence of FolderX in project AProject, view AProject and moves it to project StarDraw, view Release 1.0 Maintenance, as a child folder to Documents/Images:
stcmd move –p “Administrator:Administrator@localhost:49201/StarDraw/Release 1.0 Maintenance/Documents/Images” –type Folder –fp “AProject/AProject/FolderX”