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 >
OS/2 REXX Batch file  |  1995-07-19  |  2KB  |  70 lines

  1. /*------------------------------------------------------------------
  2.  * miniftp.cmd :
  3.  *------------------------------------------------------------------*/
  4.  
  5. trace off
  6.  
  7. /*------------------------------------------------------------------
  8.  * load functions, if needed
  9.  *------------------------------------------------------------------*/
  10. if RxFuncQuery("FtpLoadFuncs") then
  11.    do
  12.    rc = RxFuncAdd("FtpLoadFuncs","RxFtp","FtpLoadFuncs")
  13.    rc = FtpLoadFuncs()
  14.    end
  15.  
  16. if RxFuncQuery("SysLoadFuncs") then
  17.    do
  18.    rc = RxFuncAdd("SysLoadFuncs","RexxUtil","SysLoadFuncs")
  19.    rc = SysLoadFuncs()
  20.    end
  21.  
  22. /*------------------------------------------------------------------
  23.  * set up signal
  24.  *------------------------------------------------------------------*/
  25. signal on halt
  26.  
  27. /*------------------------------------------------------------------
  28.  * get parameters
  29.  *------------------------------------------------------------------*/
  30. parse arg user pass ldir rdir file .
  31.  
  32. say "Start"
  33.  
  34. cd ldir
  35.  
  36. /*------------------------------------------------------------------
  37.  * set things
  38.  *------------------------------------------------------------------*/
  39. rc = FtpSetUser("hobbes.nmsu.edu",user,pass)
  40. if rc <> 1 then
  41.    do
  42.    say "Error logon" FTPERRNO
  43.    call done
  44.    end
  45.  
  46. rc = FtpChDir(rdir)
  47. if rc <> 0 then
  48.    do
  49.    say "Error ChDir" FTPERRNO
  50.    call done
  51.    end
  52.  
  53. rc = FtpGet(file,file,"ASCII")
  54. if rc <> 0 then
  55.    do
  56.    say "Error Get" FTPERRNO
  57.    call done
  58.    end
  59.  
  60. say "OK"
  61.  
  62. done:
  63. cd ..
  64.  
  65. rc = FtpLogoff()
  66.  
  67.  
  68.  
  69. exit
  70.