home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / networking / amitcp / gadreq.lha / ClipReq.Rexx next >
Encoding:
OS/2 REXX Batch file  |  1995-02-03  |  749 b   |  42 lines

  1. /*ClipReq V1.0
  2.   A simple utility to request the files selected by GadMget,
  3.   using DaFTP. */
  4.  
  5.  
  6. /*Variables*/
  7. GadOut = 'CLIP:'            /*Path to GadMget's output file*/
  8.  
  9. /*end of variables**/
  10.  
  11. address 'daftp'
  12. call open(clip,GadOut,r)
  13. stem = 1
  14. call sep
  15. do while ~eof(clip)
  16.   call sep
  17. end
  18. call close(clip)
  19. call open(CON,'con:0/400/-1/112/DaftRequest','W')
  20. mes = 'Selected 'stem-1' File'
  21. if stem >2 then mes =mes||'s'
  22. call writeln(con,mes)
  23. do count = 1 to stem-1
  24.   call writeln(con,fil.count)
  25. end
  26. call writeln(con,'')
  27. do count = 1 to stem-1
  28.   call writeln(con,'Requesting 'fil.count)
  29.   get fil.count
  30. end
  31.  
  32. exit
  33.  
  34. sep:
  35. lis = readln(clip)
  36. lis = left(lis,length(lis)-1)
  37. w = words(lis)
  38. do count = 2 to w
  39.   fil.stem = word(lis,count)
  40.   stem = stem + 1
  41. end
  42.