Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

attach/detach file content from/to StarTeam artifacts using the attachment command

attach/detach file content from/to StarTeam artifacts using the attachment command

Use the attachment command to add an attachment to a ChangeRequest, Requirement, Task, or custom component (item types which support the attachment service)

Syntax
The syntax for this command is:
attachment –p “user:pwd@host:port/project/view” [ -epwdile “pathToPasswordFile” ] –type “typeName” –id itemID 
-afp attachmentFilePath [ -an “attachmentName” ] [-rmv]


Parameter Description

-type describes the type name of the item to be shared. May be one of the stock type names, e,g,
changerequest, task, requirement, sprint, story, plan or any custom type name (which supports attachments)

-id can be either the unique item (view member) id of the item. View Member IDs are found by looking in the property lists of the cpc or can be queried using the select command, OR, the primary descriptor of the item; e.g. changerequest, task or requirement number.

-afp is the fully qualified path to the attachment on disk.

-an is an optional attachment name. 
If this is not specified, then the file name will be used as the attachment name.

-rmv if specified, remove the attachment identified either by attachment name

Note that is an attachment with this name already exists, attached to this item, then the original attachment content will be replaced.

The attachment command returns the id of the newly created / updated attachment.

Note also that attachments associated with a specific artifact instance may be queried using the select command. the syntax is

select attachments from task where viewmemberid = nnn -p "user:pwd@host:port/project/view"

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Version history
Revision #:
1 of 1
Last update:
‎2016-11-07 16:15
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.