home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / m2vbbs15.zip / M2UP.CMD < prev    next >
OS/2 REXX Batch file  |  1993-08-14  |  3KB  |  75 lines

  1. /***************************************************************************
  2.   Rexx VBBS/2-M2Zmodem Interface Written by Cunnus ShaktI @1509509
  3.   Vnet. Call The Premier OS/2 Support BBS - Moonflower/2 at
  4.   509-891-6148. To Install this file, Change the 'Filein =' &
  5.   'Fileout =' variables to reflect your main vbbs directory. Do not
  6.   change the filenames, just The paths. Then place this file in your
  7.   main VBBS directory along With a copy of M2ZModem transfer protocol
  8.   & the M2zmodem.msg file. The Command lines in vconfig should be as
  9.   follows:
  10.  
  11.   Upload: M2UP.CMD %8 -ZR %3 %9
  12.  
  13.   These comments must remain in this position in this file in order
  14.   for this Rexx file to work correctly.
  15. ****************************************************************************/
  16. arg node mode upath vpath
  17.  
  18. /*********************Begin user configuration section*********************/
  19. filein = "c:\vbbs\mz"node".log"
  20. fileout = "c:\vbbs\dsz"node".log"
  21. /*********************End user configuration section***********************/
  22.  
  23. call RxFuncAdd 'SysFileDelete' , 'RexxUtil' , 'SysFileDelete'
  24. call SysFileDelete(fileout)
  25. call SysFIleDelete(filein)
  26. call uploadz
  27.  
  28. call lineout fileout
  29. call lineout filein
  30. call SysFileDelete(filein)
  31. exit
  32.  
  33. uploadz:
  34. parse var upath '.' isrep
  35. parse var upath upath1 'TEMP'
  36. upath2 = upath1'temp\'
  37. /* vpath1 = vpath"\"  */
  38. othra = lastpos('\',upath)
  39. othrb = othra + 1
  40. othrpath = delstr(upath,othrb)
  41. upatha = upath'\'
  42. select
  43.    when isrep = 'REP' then comline = 'm2zmodem.exe -f 1 -h -o mz'node'.log -n -c -r 'upath2
  44. /*   when othra = '0' then comline = 'm2zmodem.exe -f 1 -h -o mz'node'.log -n -c -r 'vpath1 */
  45.   when vpath = ' ' then comline = 'm2zmodem.exe -f 1 -h -o mz'node'.log -n -c -r 'upatha
  46.   otherwise comline = 'm2zmodem.exe -f 1 -h -o mz'node'.log -n -c -r 'othrpath
  47. end
  48. comline
  49. call linein filein
  50. call writeup
  51. return
  52.  
  53. writeup:
  54. itis = ' :ZModem rz session closed'
  55.    do until filname = ' '
  56. if filepatha = itis then leave
  57. filname = linein(filein)
  58. parse var filname "=> " filepatha
  59. filepath = upath2''filepatha
  60. filepathb = 'vbbs'node'.rep'
  61. rencom = 'ren 'filepath filepathb
  62. if isrep = 'REP' then rencom
  63. drop isrep
  64. size = linein(filein)
  65. parse var size "=>" bc
  66. parse var bc "=" cpsa
  67. parse var cpsa cpsb "."
  68. parse var cpsa "=" bytesa
  69. bytes = right(bytesa,7)
  70. cps = right(cpsb,5)
  71. call LINEOUT fileout,'Z'bytes' 19200 bps'cps' cps   0 errors     0 1024' filepath' 0'
  72. if (lines(filein)=0) then leave
  73. end
  74. return
  75.