home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / dragen1.zip / DRAGSTRT.CMD < prev    next >
OS/2 REXX Batch file  |  2000-03-18  |  2KB  |  74 lines

  1. /* Drag and Drop script, copyright (c) 2000, Keith Cotroneo */
  2. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  3. call SysLoadFuncs
  4. parse source operatingsystem commandtype sourcefilename
  5.  
  6. rc=SysFileDelete(dflag)
  7. If rc \= 0 then do
  8.         Say 'Dflag not deleted - rc='||rc
  9. end /* do */
  10.  
  11. rc=SysFileDelete(dtemp)
  12. If rc \= 0 then do
  13.         Say 'Dtemp not deleted - rc='||rc
  14. end /* do */
  15.  
  16. ftppath=filespec('path',sourcefilename)
  17. ftppath=filespec('drive',sourcefilename)||ftppath
  18. ftporg=ftppath
  19. ftppath=ftppath||dtemp
  20. parse arg string
  21. say "args= "STRING
  22.  
  23. 'Copy '||string||' '||ftppath
  24. if rc \= 0 then do
  25.         say 'Copy of '||string||' to '||ftppath||' failed!'
  26. end
  27.  
  28. fname=FILESPEC("name",STRING)
  29. if right(fname,1)='"' then
  30. fname=left(fname,(length(fname)-1))
  31. say fname
  32. if length(fname) > 0 then do
  33.         rc=stream(ftppath,'c','open')
  34.         if rc \= "READY:" then do
  35.                 say 'Could not open '||ftppath||' !'
  36.         end
  37.         currentalias=linein(ftppath)
  38.         say currentalias
  39.         sortit=linein(ftppath)
  40.         say sortit
  41.         regetcheck=linein(ftppath)
  42.         say regetcheck
  43.         proxycheck=linein(ftppath)
  44.         say proxycheck
  45.         asciicheck=linein(ftppath)
  46.         say asciicheck
  47.         extended=linein(ftppath)
  48.         say extended
  49.         colcheck=linein(ftppath)
  50.         say colcheck
  51.         port=linein(ftppath)
  52.         say port
  53.         rc=stream(ftppath,'c','close')
  54.         rc=stream('dflag','c','open')
  55.         if rc \= "READY:" then do
  56.                 say 'Could not open Dflag !'
  57.         end
  58.         call lineout "dflag",fname
  59.         call lineout "dflag",currentalias
  60.         call lineout "dflag",sortit
  61.         call lineout "dflag",regetcheck
  62.         call lineout "dflag",proxycheck
  63.         call lineout "dflag",asciicheck
  64.         call lineout "dflag",extended
  65.         call lineout "dflag",colcheck
  66.         call lineout "dflag",port
  67.         rc=stream('dflag','c','close')
  68. end
  69. 'Start "DragenDrop" '||ftporg||'dragen'
  70. exit
  71. getstr="start "ftporg"\"dragen
  72. getstr
  73.  
  74.