/* $VER: FTPPUT v1.00 by Christer Bjarnemo  mr.bjarnemo@mn.medstroms.se
 *
 * IMPORTANT: You MUST have FTPMOUNT installed which makes any ftp site
 *            a part of amigados. Look at aminet:pub/disk/ftpmount.lha
 *
 */

parse arg source dest

call addlib('rexxreqtools.library',0,-30,0)
call addlib('rexxsupport.library',0,-30,0)

if source = '' then source=rtfilerequest('','','Select file to send...')
if source ~= '' & dest = '' then dest=rtfilerequest('ftp:','','Send file(s) to a site...')
if dest = '' then dest = '""'

if source = '?' | source = '' then do
	say 'FTPPUT V1.00 by Christer Bjarnemo  mr.bjarnemo@mn.medstroms.se'
	say ''
	say 'USAGE: ftpput [source] [ftp:address/path/file]'
	say ''
	say 'Example: ftpput work:trashcan/myfile.lha ftp:ftp.luth.se/pub/aminet/new'
	say ''
	say 'If anything is omitted, a reqtools requester will appear..'
	say 'Its also possible to use wildcards...'
	exit
	end

address command 'makedir 'dest
address command 'copy 'source' 'dest
