How can I add a file to a project using the command line (STCMD)

0 Likes

Problem:

How can I add a file to a project using the command line (STCMD)

Resolution:

  • Product Name: StarTeam
  • Product Version: 2005, 2005 Rel2, 2006
  • Product Component: Client, Command Line
  • Platform/OS Version: All

Question:

How do I add a file to a project or view using the command line?


Answer:

First, make sure the command line function can be run from the system path. Open a Windows command line: Start --> Run --> CMD Type stcmd and hit enter. If a message is returned that it cannot find this command, then navigate within the command line window to the StarTeam client installation folder (normally, C:\Program files\Borland\StarTeam Cross Patform Client 2006) and enter stcmd. If this does not work, then please contact Technical Support.

After you have verified that you can use STCMD, you can add a file using the following method:

Use stcmd add to add files to a project from the command line.

You can simultaneously link the added files to a process item. All the files successfully added using this command will be linked and pinned to the tip revision of the process item. Use the -active option to specify the currently active process item (previously set using a StarTeam client on your workstation). If no item is active or you prefer to use another item, use the option that indicates the type of the process item (-cr, -req, or -task), followed by the complete path from the root folder of the StarTeam project view to the item. Use the -mark option to simultaneously mark the process item as fixed, finished, or complete, depending on its type. For example, a change request can be marked as fixed. The item is not marked as fixed, finished, or complete unless all the files are successfully added.

The syntax for this command is as follows:

stcmd add -p "projectSpecifier" [-pwdfile "filePath"] [-cmp] [-csf] [-encrypt encryptionType] [-is] [-q] [-x] [-stop] [-rp "folderPath" | -fp "folderPath"] [- l | -u | -nel] [-ro | -rw][-d "description"] [-vl "labelName"] [-eol [on | off]] [-files...]


Author: Donnie Nix

Old KB# 27792
Comment List
Related
Recommended