Metropoli BBS
VIEWER: hip_copyfilereq.rexx MODE: TEXT (ASCII)
/* HippoPlayer - Copy file
**
** This script parses the filename of the played module and then
** pops up an requester with which you can choose the destination
** for the module. The module will then be copied there.
** You can choose if the module should be deleted after copying
** or not.
**
** Written by Marcel Doering [DonDoringo@GURU.rhein-main.de]
*/

options results

address 'HIPPOPLAYER'

get cnam
CNAM = result

IF ~EXISTS(cnam) then do
nf=rtezrequest('Couldn`t find 'cnam' !'||'0a'x||'Aborting...','Okay','HiP_copy.rexx',)
exit
end

get name
NAME = result

ADDLIB('rexxreqtools.library',0,-30,0)
dest=rtfilerequest(,NAME,'Select destination !',,'')
if dest='' then do
nd=rtezrequest('No destination selected, aborting !','Okay','HiP_copy.rexx',)
exit
end

say 'Copying file 'cnam' to 'dest' !'

ADDRESS COMMAND 'COPY "'cnam'" "'dest'"'

say 'Finished'

del=rtezrequest('Do you want to delete 'cnam' ?','Yes|No','HiP_copy.rexx','rtez_defaultresponse = 0',)
if del=1 then
address command 'delete 'cnam''

EXIT
[ RETURN TO DIRECTORY ]