![]() |
Telelogic SYNERGY (steve huntington) | ![]() |
Topic Title: get the attachment to my file system from CLI Topic Summary: Created On: 6-Apr-2006 12:43 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi
I would like to get the attachment to my file system from CLI, I try to sync or reconcile but It didnt help. I also try ccm view and it didnt works Can I ? Ronen ------------------------- Ronen Ben-Chamo Configuration Managment |
|
![]() |
|
![]() |
|
Do you mean attachments of a CR?
Then try this (we use ksh) to get all attachments (our DELIM is "~"): for ATT in `ccm query -u -nf "is_attachment_of(type='problem')" -f "%objectname,%attachment_name" | sed -e 's/ /_/g'` do CRNR=`echo $ATT | cut -d '~' -f1 | cut -d '_' -f2` FPN=`echo $ATT | cut -d ',' -f1` INSTANCE=`echo $FPN | cut -d ':' -f3` CVTYPE=`echo $FPN | cut -d ':' -f2` DESCR=`echo $ATT | cut -d ',' -f2-` ENDING=${DESCR##*\.} ATTFILENAME=${CRNR}_${INSTANCE}.${ENDING} ccm set ${CVTYPE}_cli_view_cmd "cp %filename ${ATTFILENAME}" ccm view $FPN done You may include a "mv" to the original filename (the files you get with this loop have names like "1234_1.doc" for the first attachment of CR 1234 which is a .doc-file) or modify the first query to solve your needs (and not to return all attatchmants in the whole database). Regards, Matthias Edited: 4-May-2006 at 12:02 by Matthias Schwellenberg |
|
![]() |
Telelogic SYNERGY
» SYNERGY/CM
»
get the attachment to my file system from CLI
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.