Add Files: add

Use 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, using the forward slash (/) as a delimiter between folder names. For out-of-view process items, specify the project name and view name in front of the complete folder path. Separate the view path with a colon (:). For example, -cr MyProject/RootView:ChildView/SourceCode/37 specifies change request 37 in the SourceCode folder of the ChildView view in the MyProject project. During execution, the process first assumes that the process item is in the current view, and it checks the current view to determine whether the full path corresponds to a folder path within that view. If the process item is not found in the current view, it is treated as an out-of-process item, and the search for the process item begins from the project and view.

Use the -mark option to simultaneously mark the process item as fixed, finished, or complete, depending on its type. A StarTeam Server transaction processes the files selected to add. They succeed or fail together. Additionally, StarTeam creates a check in change package in the target view.

Syntax

The syntax for this command is:

stcmd{Ex} add  [[-p "projectSpecifier"] [-epwdfile "filePath"]
[-cmp] [-csf] [-encrypt encryptionType] ][-is] [-nivf] [-rp "folderPath"
| -fp "folderPath] [-l | -u | -nel] [-ro | -rw]] [-d "description" 
| -rf "fileName"] [-vl "labelName] [[ -active | 
[-cr | -req | -task] processItemPath] [-cp "name"] [-mark]] 
[-q -pf "filterName"] [-ofp "resultsOutputFilePath"] -pi typename:"path" [files...]

Parameters

For information about the command parameters, refer to Operation Parameters.

Example

The following example uses add to add all .doc files with the status Not In View to User Manual, a child of the root folder StarDraw (in the StarDraw view of the StarDraw project). It locks the files and gives them the description "First draft of chapter".

stcmd add -rp "1024/StarDraw/StarDraw/User Manual" -l -d "First draft of chapter" "*.doc"