Download attachments from the PR/CR via Web Mode CLI

219 views Asked by At

Is there a way to download attachments from the CR/PR in Rational Change Server via Web Mode CLI? I know that is possible to do via the classic client's ccm, but in the Web Mode CLI it isn't possible in the same manner (i.e. ccm export does not exist or there is a permissions problem).

Regards, Pawel

EDIT: I eventually arrived at the solution.

1

There are 1 answers

0
Pawel K On BEST ANSWER

You can cat the contents of the object represented by its objectname, the problem was that the attachment's object name has a white space inside...

ccm query "is_attachment_of(cr('CR_PR_displayname'))" -u -f "%objectname %attachment_name %attachment_size"

then with the objectname of an attachment:

ccm cat objectname_of_an_attachment > C:\attachment_name

attachment_name - holds the name with extension

attachment_size - holds the size in Bytes