home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Beijing Paradise BBS Backup
/
PARADISE.ISO
/
software
/
BBSDOORW
/
FF_200.ZIP
/
FFFTP.ZIP
/
FFFTP
/
HOBBES
/
IMPORT
/
H_GETASC.CMD
next >
Wrap
OS/2 REXX Batch file
|
1995-07-19
|
2KB
|
70 lines
/*------------------------------------------------------------------
* miniftp.cmd :
*------------------------------------------------------------------*/
trace off
/*------------------------------------------------------------------
* load functions, if needed
*------------------------------------------------------------------*/
if RxFuncQuery("FtpLoadFuncs") then
do
rc = RxFuncAdd("FtpLoadFuncs","RxFtp","FtpLoadFuncs")
rc = FtpLoadFuncs()
end
if RxFuncQuery("SysLoadFuncs") then
do
rc = RxFuncAdd("SysLoadFuncs","RexxUtil","SysLoadFuncs")
rc = SysLoadFuncs()
end
/*------------------------------------------------------------------
* set up signal
*------------------------------------------------------------------*/
signal on halt
/*------------------------------------------------------------------
* get parameters
*------------------------------------------------------------------*/
parse arg user pass ldir rdir file .
say "Start"
cd ldir
/*------------------------------------------------------------------
* set things
*------------------------------------------------------------------*/
rc = FtpSetUser("hobbes.nmsu.edu",user,pass)
if rc <> 1 then
do
say "Error logon" FTPERRNO
call done
end
rc = FtpChDir(rdir)
if rc <> 0 then
do
say "Error ChDir" FTPERRNO
call done
end
rc = FtpGet(file,file,"ASCII")
if rc <> 0 then
do
say "Error Get" FTPERRNO
call done
end
say "OK"
done:
cd ..
rc = FtpLogoff()
exit