Hello All

  Sometime you get a file split across more than news message and you need
to stick them back together. This script will attempt to do that.

-- 8< -- Cut here -- 8< --
/*
 $VER: 0.04 JoinTheParts_MD.rx (21-02-2000)
 $AUTHOR: by Jules <[EMAIL PROTECTED]> ©2000
 $DESCRIPTION: Stick Uudecode attachments back together.

 This script should join the parts of a file which has been
 split across a number of messages, I hope.

Libraries:
 ixemul.library (v48)
 reqtools.library (v38,1413)
 rexxreqtools.library (v37)
Command:
 Uudecode (on Aminet, search slrn in News/Comm)

Instructions:
 1) Select but do not open the first part of the file; it must contain
    the the starting boundary.
 2) Run this script.
 3) Enter the number of parts in the first reqester, or if you
    run it from a 'shell', give the number as an argument.
 */

OPTIONS RESULTS
PARSE ARG PICOUNT
IF PICOUNT <1 THEN DO
 USINGREQTOOLS=0
 NL = '0a'x
 CALL ADDLIB("libs:rexxreqtools.library", 0, -30, 0)
 CALL RTGETLONG('2','How many parts do you'NL'wish to join together.',
 ,'Come togerther right now',"_Yes please|_No thank you",'RTGL_MIN=2 RTGL_MAX=99')
 IF RTRESULT~=1 THEN DO ; EXIT ; END
 PICOUNT=RESULT
 USINGREQTOOLS=1
END
IF PICOUNT<2 THEN EXIT
CALL PRAGMA 'DIRECTORY','T:'
ADDRESS MD.1
ExtractSelectedMsgs File 'EXTRACTEDFILE' NOREQ
DO EE=2 TO PICOUNT
 GOTOMSG NEXT ; ExtractSelectedMsgs File 'EXTRACTEDFILE' PART 1 APPEND NOREQ
END
ADDRESS COMMAND 'WAIT'
CALL PRAGMA 'DIRECTORY','RAM:'
CALL OPEN('MDP','ENV:Vapor/MD2_LASTUSEDDIR','R')
MDPATH=READLN('MDP') ; CALL CLOSE('MDP')
ADDRESS COMMAND 'C:uudecode '||MDPATH||'/EXTRACTEDFILE >NIL:'
CALL PRAGMA 'DIRECTORY','SYS:'
IF  USINGREQTOOLS=1 THEN CALL rtezrequest('All done.',"Thank you")
                    ELSE SAY 'Complete.'
ADDRESS COMMAND 'C:DELETE '||MDPATH||'/EXTRACTEDFILE QUIET >NIL:'
EXIT

-- 8< -- And here -- 8< --

-- 
Regards
  Jules
__________________________________________________________________
MicroDot-II Mailing List - http://www.vapor.com/md2/
MicroDot-II FAQ: http://faq.vapor.com/md2/
Listserver Help: mailto:[EMAIL PROTECTED]?Subject=HELP
Unsubscribe....: mailto:[EMAIL PROTECTED]?Subject=UNSUBSCRIBE

Reply via email to