Use add-folder to add StarTeam folders to a view from the command line. You can add the folder to the root folder or any other folder in that view. The working folder for your new StarTeam folder is created by default within StarTeam, not on your workstation. The working folder has the same name as the StarTeam folder. It is a child folder of the working folder for the StarTeam folder’s parent.
For example, suppose you create a StarTeam folder named Wizard. Wizard is a child of a StarTeam folder whose working folder is C:\StarDraw. Therefore, Wizard’s working folder becomes C:\StarDraw\Wizard.
Using the -is option allows you to add a branch of folders to the project view’s folder hierarchy. When you use -is, use either -rp or -fp to specify the folder on your workstation whose child folders will become the new StarTeam folder’s child folders. Using -fp is recommended, as it specifies the path directly to the parent of those child folders. In contrast, -rp, which specifies the path to the working folder used for the view's root folder, appends StarTeam folder names in the hierarchy from the root folder to the new folder to the path you specify. Only when you use the -is option do -rp and -fp have any effect on this command.
The syntax for this command is:
stcmd{Ex} add-folder [[-p "projectSpecifier"] [-epwdfile "filePath"]
[-cmp] [-csf] [-encrypt encryptionType] ][-is] [-rp "folderPath" |
-fp "folderPath"] -name "folderName" [-d | -r "description"| -rf "fileName"]
[-ex "excludeType"] [-q|-pf "filterName"] [-ofp "resultsOutputFilePath"]
[-exlist "fileMask" | -exfile "fileName"]
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.
When used with add or ci, the command recursively visits all modified files in all sub-folders and checks them in.
Overrides the working folder or working directory for the StarTeam view’s root 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.
The UNIX shell interprets a backslash (\) as an escape character when it precedes certain characters, such as quotation marks. As a result, an error occurs in the following example:
stcmd ci -p "xxx" -rp "C:\" "*"
which is interpreted as:
stcmd ci -p "xxx" -rp "C:" *"
To avoid a situation like this, escape the final character in "C:\" as follows:
stcmd ci -p "xxx" -rp "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" -rp "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.
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.
Indicates the exclude lists to be used by this new folder. Exclude lists exclude certain files or types of files from visibility. If a working file in this folder’s working folder would have the status Not In View but it matches a file specification in one of the exclude lists, the application does not display it at all. It is as though the file did not exist.
For example, suppose you are creating files in an application that makes automatic backup copies of each file (with the extension .bak) every time you save a file. Your working folder might contain several .bak files, but you have no reason to add them to the project view. From the application, it is annoying to see these .bak files as possible candidates, so you exclude them. Excluding files is done on a per-folder basis. However, exclude lists can be inherited from parent folders.
The full syntax is: -ex excludeType
The types include:
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.
Specifies the local exclude list for this folder. Use a maximum of 254 characters. Enter one or more file specifications (using the standard * and ? wild cards), separated by commas, spaces, or semicolons. To include a comma, space, or semicolon as part of the specification, enclose the specification in double quotation marks: *.exe,*.dll p*z.doc;*.t?t "test *.*"
If you are using double-quotation marks in your exclude list or have a lengthy exclude list, we recommend that you use the -exfile option. With -exlist, each quotation mark in the exclude list needs to be preceded by the escape character for your system or shell. For example, the caret (^) works on NT systems. With-exfile , you do not need to use escape characters.
The following example uses add-folder to create a folder named Wizard as a child of the StarDraw folder, the root folder of the StarDraw project view. In addition, it sets a local exclude list for Wizard. By default, Wizard inherits its parent folder’s exclude lists and use the local one as well.
Use the set command to set the context of the project/view/parent folder.
stcmd add-folder -name "Wizard" -d "StarDraw setup wizard" -exlist "*.bak"
The next example creates the same folder as in the previous example. However, it includes child folders. In this case, the folder with the path C:\Wizard has child folders (Source, Spec, and Doc), all of which are added as StarTeam folders in addition to Wizard. All of the new folders (Wizard, Source, Spec, and Doc) will have the default working folders assigned to them automatically by the StarTeam Server, regardless of the setting for -fp. Wizard will be the parent of Source, Spec, and Doc. StarDraw is the parent of Wizard.
stcmd add-folder -name "Wizard" -d "StarDraw setup wizard" -is -fp "C:\Wizard" exlist "*.bak"