/* rPutfiles v1.00 - by Rick Taylor, 8-31-94  */
/* This script acts as a user-friendly front  */
/* end for Putfiles                           */

options results
call addlib("rexxreqtools.library",0,-30,0)
lf = '0a'x
cr = '0d'x
fonttag=""
tosend = ""
address command

/* Filename, please? */

tosend = rtfilerequest(, , "Select a file to send" , , fonttag "rtfi_buffer = true")
if rtresult == 0 then exit

/* Now, we need to prompt for a directory on the UNIX side ... */

whereto = ""
msg = "Where on your UNIX account should we put "||tosend||"?"||lf||"<RETURN> for default"
whereto = rtgetstring("", msg,"rPutfiles v1.00", , fonttag)

/* Send it ... */

if whereto == "" then 'dnet:putfiles' tosend
if whereto ~= "" then 'dnet:putfiles -d'whereto tosend
if whereto = "" then whereto = "Default UNIX Directory"

msg = "File: "||tosend||lf||"Put in directory:"||whereto||lf
call rtezrequest msg,"_Ok","rPutfiles Information",fonttag

/* Goodnight, John Boy */

exit
