home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / tcp / Networking / TCP / FTP / DaFTP / Rexx / get.daftp < prev    next >
Text File  |  1994-12-26  |  557b  |  37 lines

  1. /* Get.daftp */
  2. /* get file <file> from site <site> of your hotlist, and put it in
  3.  * directory <dir> on your machine
  4.  * By Osma Ahvenlampi
  5.  */
  6.  
  7. parse arg file site dir ascii
  8.  
  9. if file = "" then
  10.     exit 10
  11.  
  12. if ~show('P','daftp') then do
  13.     address command 'Run >NIL: DaFTP'
  14.     address command 'WaitForPort daftp >NIL:'
  15.     if RC ~= 0 then
  16.         exit 20
  17. end
  18.  
  19. if ascii ~= "" then
  20.     mode = "ASCII"
  21. else
  22.     mode = "BIN"
  23.  
  24. address 'daftp'
  25.  
  26. if site ~= "" then 
  27.     'site' site
  28.  
  29. if dir ~= "" then
  30.     'setattr localdir' dir
  31.  
  32. 'connect noscan'
  33. 'get' mode 'file' file
  34. 'disconnect'
  35.     
  36. exit 0
  37.