Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 6-Apr-2006 12:43
User is offline View Users Profile Print this message


Ronen Ben-Chamo

Posts: 84
Joined: 1-Dec-2005

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
Report this to a Moderator Report this to a Moderator
 4-May-2006 11:33
User is offline View Users Profile Print this message


Matthias Schwellenberg

Posts: 15
Joined: 12-Jun-2003

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 0 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.