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

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