|  |     
  In the past I had several customer request exactly in .0, the best way
    and fastest way that I know is forward all documents to wherever you
    want to send them then execute the script below which I used many
    times and worked like magic. I found this script from the the old
    conference and reprinted without permission from the author.
    
    WARNING:
      You will looses titles of attachments if you are sending to a remote
    node...............................
    *********************************************************************
    
   .fx PROMPT "In which folder do you wish to file attachments?"
   .fx GET #FOLDER = OA$PROMPT_TEXT
   .FX GET #EMDOC = OA$CURDOC
   .FX FOR CAB$ATTACH DO GET #DOC = .VALUE \\ -
    FOR CAB$ATTACH_ATTRIBUTES WITH .KEY = "DTITLE" DO GET #TITLE = .VALUE \\ -
    GET OA$FUNCTION = "DISPLAY Filing " #TITLE \\ -
    FORCE \\ -
    CABINET FILE_ATTACHMENT ,#DOC,#FOLDER,#TITLE \\ -
    CABINET CURRENT #EMDOC
     
    
    TTFN
    ricardo    
    
 | 
|  | The methord described in .1 will work but all attachments will get seperated
from their original documents. If all the original documents are WPL docs
with no attachments then there is no problem, however if the originals had
attachments they will not have them after the transfer.
e.g.
Start out with 3 docs, document number 2 having an attachments.
DOC1
DOC2 - ATT1
DOC3
after the transfer you will have 4 independent documents
DOC1
DOC2
ATT1
DOC3
In the above case it is quite simple to sort out what should be attached to what
and fix the problem, but if you have several hundred documents with attachments
then that can be a major task, if not impossible.
Terry
 | 
|  |     Another way to do this is, now, to make the old user's drawer shared
    and just have the user-who's-staying be a sharer of it. (S/he can then
    move documents into other draers/folders if s/he wants, as and when).
    
    Of course, you need v3 for this . . .
    
    D.
 | 
|  |     The following script is something I have used in the past to tranfer a
    folder and retain the attachment hierarchy. Note that that hierarchy is
    only retained if the received mail is a local mail. This is since when
    attachments are sent remotely the attribute "ATT_DOC" is lost and
    therefore I can't tell what was attached to what.
    
    This script also retains all teh attributes of any MAIL messages since
    it uses CAB COPY rather than CAB FILE_ATTACH.
    
!+
!	FILE_ATTACHED.SCP
!+
.LABEL START
get #x = #y = 0
get #oldkey = oa$curdoc
prompt Folder to file into?\oa$fld_stay
.if oa$prompt_dispose ne 2 then .exit
get #folder = oa$prompt_text
for cab$attributes with .key = "ATT_DOC" do compute #x=#x+1\\-
get #f_@#x = .value\\get #t_@#X = cab$attach.dtitle[.value]
.if #X then .goto file_att
display No attachments
.exit
.label file_att
compute #y = #y + 1
.if #y gt #x then .exit
get oa$display = "Filing attachment " #Y \force
!get oa$func = "cab file_attachment , #f_" #Y " , #folder, #t_" #y
	GET #SFILE = #NFILE = #F_@#Y
	GET_SYMBOL #SFILE,#SOUT,"." 
	GET #SFILE = "." #SFILE
	CAB CREATE #FOLDER,#SFILE,#KEYC
	GET #FILE = CAB$.FILENAME[#KEYC]
!	GET OA$FUNC="CAB CREATE #FOLDER,#F_" #Y ",#KEYC"
	GET #KEYDB = #FOLDER:30 OA$CURDOC_FIXER
	CAB CURRENT #OLDKEY
	WRITE CHANGE DOCDB %KEY = #KEYDB , FILENAME = #NFILE,DAPOINTER = "S", - 
	MODIFY = "Y", TYPE = "MAIL"
	GET #DAUTHOR = CAB$.DAUTHOR[#KEYC]
	GET #CREATED = CAB$.DCREATED[#KEYC]
	GET #MODIFIED = CAB$.DMODIFIED[#KEYC]
	GET #FORMAT = CAB$.DFORMAT[#KEYC]
	GET #DSAB = CAB$.DDSAB[#KEYC]
	CAB SELECT ,,,@#CURDOC
	WRITE CHANGE DOCDB %KEY = #KEYDB, AUTHOR = #DAUTHOR,-
	CREATED = #CREATED,MODIFIED = #MODIFIED,FORMAT=#FORMAT,DSAB=#DSAB
	CAB SELECT #FOLDER,,,@#CURDOC
.LABEL MAKE_COPY
	GET OA$FUNC="CAB COPY ,#FOLDER,#KEYC1,#T_" #Y 
	CAB SELECT #FOLDER,,,@#CURDOC
	GET #NUM_ATTS = CAB$ATTRIBUTES.%COUNT["ATT_DOC"]
	COMPUTE #Y = #Y + #NUM_ATTS		
	WRITE CHANGE DOCDB %KEY = #KEYDB,FILENAME=#FILE,DAPOINTER="P",TYPE=""
	CAB DELETE_OR_REFILE #KEYC,OA$WASTEBASKET
.goto file_att
.EXIT
!
! Author: LAAHS 
!
! Modified by: 		 | Date:                | Reason:
!-----------------------------------------------------------------------------
! LAAHS                  | 03-Jun-1991 04:16pm  | Element created, please state
!                        |                      | modifications down here
!
!This script will read all the attachements from the current mail message
!and refile them into the specified folder keeping the same hierarchy as 
!the originals.
!
! COPYRIGHT (c) 1991 BY
! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS.
! ALL RIGHTS RESERVED.
!
! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
! ONLY  IN  ACCORDANCE  OF  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE
! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR  ANY  OTHER
! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
! OTHER PERSON.  NO TITLE TO AND  OWNERSHIP OF THE  SOFTWARE IS  HEREBY
! TRANSFERRED.
!
! THE INFORMATION IN THIS SOFTWARE IS  SUBJECT TO CHANGE WITHOUT NOTICE
! AND  SHOULD  NOT  BE  CONSTRUED  AS A COMMITMENT BY DIGITAL EQUIPMENT
! CORPORATION.
!
! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE  OR  RELIABILITY OF ITS
! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
!
!-------------------------------------------------------------------------
    
 |