home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / m2vbbs11.zip / M2ZVBBS.CMD < prev    next >
OS/2 REXX Batch file  |  1993-07-14  |  2KB  |  60 lines

  1. /***************************************************************************
  2.   Rexx VBBS-M2Zmodem Interface Written by Cunnus ShaktI @5092 Vnet.
  3.   Call The Premier OS/2 Support BBS - Moonflower/2 at 509-891-6148.
  4.   To Install this file, Change the Filein= , Fileout= & batchlist=
  5.   variables to reflect your main vbbs directory. Do not change the
  6.   filenames, just The paths. Then place this file in your main VBBS
  7.   directory along With a copy of M2ZModem transfer Protocol. These
  8.   comments must remain in order for this Rexx file to work correctly.
  9. ****************************************************************************/
  10.  
  11. arg node mode vpath
  12. filein = "d:\vbbs\mz"node".log"
  13. fileout = "d:\vbbs\dsz"node".log"
  14. batchlist = "d:\vbbs\batch"node".lst"
  15. call RxFuncAdd 'SysFileDelete' , 'RexxUtil' , 'SysFileDelete'
  16. call SysFileDelete(fileout)
  17. isbatch = substr(vpath,1,1)
  18. if isbatch = '@' then call batch
  19. if over = 'bye' then exit
  20. call single
  21. exit
  22. single:
  23. 'm2zmodem.exe -f 1 -h -o mz'node'.log -n -s 'vpath
  24. call linein filein
  25. lineb = linein(filein)
  26. parse var lineb "=>" filepath
  27. linec = linein(filein)
  28. parse var linec "=>" bc
  29. parse var bc "=" cpsa
  30. parse var cpsa cpsb "."
  31. parse var cpsa "=" bytesa
  32. bytes = right(bytesa,7)
  33. cps = right(cpsb,5)
  34. call lineout filein
  35. call SysFileDelete(filein)
  36. call LINEOUT fileout,'z'bytes' 19200 bps'cps' cps   0 errors     0 1024'filepath' 0'
  37. return
  38. batch:
  39.    do until vpath = " "
  40. vpath = linein(batchlist)
  41. if vpath = " " Then dlline = 'm2zmodem.exe -f 1 -h -n -s nofile'
  42.                else dlline = 'm2zmodem.exe -f 1 -h -o mz'node'.log -n -c -s 'vpath
  43. dlline
  44. call linein filein
  45. lineb = linein(filein)
  46. parse var lineb "=>" filepath
  47. linec = linein(filein)
  48. parse var linec "=>" bc
  49. parse var bc "=" cpsa
  50. parse var cpsa cpsb "."
  51. parse var cpsa "=" bytesa
  52. bytes = right(bytesa,7)
  53. cps = right(cpsb,5)
  54. call lineout filein
  55. call SysFileDelete(filein)
  56. call LINEOUT fileout,'z'bytes' 19200 bps'cps' cps   0 errors     0 1024'filepath' 0'
  57.    end
  58. over = 'bye'
  59. return
  60.