Hi Emmanuel,

Thanks! Never occurred to me to use standard PERL code. Will try this out
as soon as I can.

Once again, thanks for taking time to help out.

PJ

> here is an example I used to dump tickets to files:

>

>

>       my $Attachments = $Transaction->Attachments;

>        $Attachments->OrderBy( FIELD => 'id', ORDER => 'ASC' );

>        while ( my $Attachment = $Attachments->Next ) {

>            next unless ( $Attachment->Filename );

>            my $filename = $Attachment->Filename;

>            $filename =~ s/\//-/g;

>            my $file_path = $attachments_dir."/".$Ticket->id."-".$filename;

>            open( FILE, '>' ,$file_path ) or die "Can't open $file_path:
$!\n";

>            print FILE $Attachment->OriginalContent;

>            close ( FILE );

>        }
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

Reply via email to