home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / m2vbbs15.zip / VXYDOWN.CMD < prev   
OS/2 REXX Batch file  |  1993-08-14  |  4KB  |  121 lines

  1. /***************************************************************************
  2.   Rexx VBBS/2-VXY CDROM file copy Interface Written by Cunnus ShaktI
  3.   @1509509 Vnet. Call The Premier OS/2 Support BBS - Moonflower/2 at
  4.   509-891-6148. To Install this file, Change the 'Filein =', 'Fileout
  5.   =' & other 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 version 2.13
  8.   (this is the only version known to work correctly with this rexx
  9.   routine.) transfer protocol & the M2zmodem.msg file. The Command
  10.   lines in vconfig should be as follows:
  11.  
  12.   Download: vxydown.CMD %8 -ZS %3
  13.  
  14.  These comments must remain in this position in this file in order
  15.  for this Rexx file to work correctly.
  16. ****************************************************************************/
  17. arg node mode vpath
  18.  
  19. /*********************Begin user configuration section*********************/
  20. cdlist = "F:G:H:I:J:K:L:"
  21. temppath = "d:\vbbs\hold"
  22. filein = "d:\vbbs\mz"node".log"
  23. fileout = "d:\vbbs\dsz"node".log"
  24. batchlist = "d:\vbbs\batch"node".lst"
  25. /*********************End user configuration section***********************/
  26. call RxFuncAdd 'SysFileDelete' , 'RexxUtil' , 'SysFileDelete'
  27. call SysFileDelete(fileout)
  28. call SysFIleDelete(filein)
  29. tempath = temppath''node
  30. parse upper var cdlist cdlista ':' cdlistb ':' cdlistc ':' cdlistd ':' cdliste ':' cdlistf ':' cdlistg ':' cdlisth ':'
  31. isbatch = substr(vpath,1,1)
  32. if isbatch = '@' then call batch
  33.      select
  34. when isbatch = cdlista then call cdcopysingle
  35. when isbatch = cdlistb then call cdcopysingle
  36. when isbatch = cdlistc then call cdcopysingle
  37. when isbatch = cdlistd then call cdcopysingle
  38. when isbatch = cdliste then call cdcopysingle
  39. when isbatch = cdlistf then call cdcopysingle
  40. when isbatch = cdlistg then call cdcopysingle
  41. when isbatch = cdlisth then call cdcopysingle
  42. otherwise nop
  43.      End
  44. if isbatch <> "@" then call single
  45.    if over = 'bye' then do
  46. call lineout fileout
  47. call lineout filein
  48. call SysFileDelete(filein)
  49. call SysFileDelete(delpath)
  50. 'echo y|del' tempath'\*.*'
  51. exit
  52.    end
  53. exit
  54. call lineout fileout
  55. call lineout filein
  56. call SysFileDelete(filein)
  57. exit
  58.  
  59. single:
  60. 'vxy.exe 'node mode vpath
  61. return
  62.  
  63. batch:
  64. call cdbatch
  65. say 'vxy.exe 'node mode vpath
  66. 'vxy.exe 'node mode vpath
  67. over = 'bye'
  68. return
  69.  
  70. cdcopysingle:
  71. numpos = lastpos('\',vpath)
  72. numposa = numpos + 1
  73. cdfile = substr(vpath,numposa)
  74. 'copy' vpath tempath
  75. vpath = tempath'\'cdfile
  76. 'attrib -r' vpath
  77. delpath = vpath
  78. over = 'bye'
  79. return
  80.  
  81. cdbatch:
  82.   do until batchpath = ' '
  83. batchpath = linein(batchlist)
  84. parse upper var batchpath iscda ':'
  85. parse upper var batchlist batchlista '.'
  86. batchlistb = batchlista'.bbb'
  87.  
  88.      select
  89. when iscda = cdlista then call cdbatchwrite
  90. when iscda = cdlistb then call cdbatchwrite
  91. when iscda = cdlistc then call cdbatchwrite
  92. when iscda = cdlistd then call cdbatchwrite
  93. when iscda = cdliste then call cdbatchwrite
  94. when iscda = cdlistf then call cdbatchwrite
  95. when iscda = cdlistg then call cdbatchwrite
  96. when iscda = cdlisth then call cdbatchwrite
  97. otherwise call regbatchwrite
  98.       end
  99. if (lines(batchlist)=0) then leave
  100.   end
  101. call lineout batchlistb
  102. call lineout batchlist
  103. call SysFileDelete(batchlist)
  104. 'copy' batchlistb batchlist
  105. call SysFileDelete(batchlistb)
  106. return
  107.  
  108. cdbatchwrite:
  109. numpos = lastpos('\',batchpath)
  110. numposa = numpos + 1
  111. cdfile = substr(batchpath,numposa)
  112. 'copy' batchpath tempath
  113. batchpatha = tempath'\'cdfile
  114. 'attrib -r' batchpatha
  115. call lineout batchlistb,batchpatha
  116. return
  117.  
  118. regbatchwrite:
  119. call lineout batchlistb,batchpath
  120. return
  121.