home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
m2vbbs15.zip
/
M2DOWN.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-08-14
|
5KB
|
155 lines
/***************************************************************************
Rexx VBBS/2-M2Zmodem Interface Written by Cunnus ShaktI @1509509 Vnet.
Call The Premier OS/2 Support BBS - Moonflower/2 at 509-891-6148.
To Install this file, Change the 'Filein =', 'Fileout =', cdlist, temppath,
& 'batchlist =' variables to reflect your main vbbs directory. Do not
change the filenames, just The paths. If you do not want the cd &
lan copy to local capabiliy, then you must remove all characthers
between the quotes for the cdlist & temppath parameters Then place
this file in your main VBBS directory along With a copy of M2ZModem
version 2.13 (this is the only version known to work correctly with
this rexx routine.) transfer protocol & the M2zmodem.msg file. The
Command lines in vconfig should be as follows:
Download: M2down.CMD %8 -ZS %3
These comments must remain in this position in this file in order
for this Rexx file to work correctly.
****************************************************************************/
arg node mode vpath
/*********************Begin user configuration section*********************/
cdlist = "F:G:H:I:J:K:L:"
temppath = "c:\VBBS\hold"
filein = "c:\vbbs\mz"node".log"
fileout = "c:\vbbs\dsz"node".log"
batchlist = "c:\vbbs\batch"node".lst"
/*********************End user configuration section***********************/
call RxFuncAdd 'SysFileDelete' , 'RexxUtil' , 'SysFileDelete'
call SysFileDelete(fileout)
call SysFIleDelete(filein)
tempath = temppath''node
parse upper var cdlist cdlista ':' cdlistb ':' cdlistc ':' cdlistd ':' cdliste ':' cdlistf ':' cdlistg ':' cdlisth ':'
isbatch = substr(vpath,1,1)
if isbatch = '@' then call batch
select
when isbatch = cdlista then call cdcopysingle
when isbatch = cdlistb then call cdcopysingle
when isbatch = cdlistc then call cdcopysingle
when isbatch = cdlistd then call cdcopysingle
when isbatch = cdliste then call cdcopysingle
when isbatch = cdlistf then call cdcopysingle
when isbatch = cdlistg then call cdcopysingle
when isbatch = cdlisth then call cdcopysingle
otherwise nop
End
if isbatch <> "@" then call single
if over = 'bye' then do
call lineout fileout
call lineout filein
call SysFileDelete(filein)
call SysFileDelete(delpath)
'echo y|del' tempath'\*.*'
exit
end
exit
call lineout fileout
call lineout filein
call SysFileDelete(filein)
exit
single:
'm2zmodem.exe -f 1 -h -o mz'node'.log -n -s 'vpath
call linein filein
lineb = linein(filein)
parse var lineb "=>" filepath
linec = linein(filein)
parse var linec "=>" bc
parse var bc "=" cpsa
parse var cpsa cpsb "."
parse var cpsa "=" bytesa
bytes = right(bytesa,7)
cps = right(cpsb,5)
call lineout filein
call SysFileDelete(filein)
call LINEOUT fileout,'z'bytes' 19200 bps'cps' cps 0 errors 0 1024'filepath' 0'
return
batch:
call cdbatch
do until vpath = " "
if (lines(batchlist)=0) then leave
vpath = linein(batchlist)
if vpath = " " Then dlline = 'm2zmodem.exe -f 1 -h -n -s nofile'
else dlline = 'm2zmodem.exe -f 1 -h -o mz'node'.log -n -c -s 'vpath
dlline
call linein filein
lineb = linein(filein)
parse var lineb "=>" filepath
linec = linein(filein)
parse var linec "=>" bc
parse var bc "=" cpsa
parse var cpsa cpsb "."
parse var cpsa "=" bytesa
bytes = right(bytesa,7)
cps = right(cpsb,5)
call LINEOUT fileout,'z'bytes' 19200 bps'cps' cps 0 errors 0 1024'filepath' 0'
call lineout filein
call SysFileDelete(filein)
end
dlline = 'm2zmodem.exe -f 1 -h -n -s nofile'
dlline
over = 'bye'
return
cdcopysingle:
numpos = lastpos('\',vpath)
numposa = numpos + 1
cdfile = substr(vpath,numposa)
'copy' vpath tempath
vpath = tempath'\'cdfile
'attrib -r' vpath
delpath = vpath
over = 'bye'
return
cdbatch:
do until batchpath = ' '
batchpath = linein(batchlist)
parse upper var batchpath iscda ':'
parse upper var batchlist batchlista '.'
batchlistb = batchlista'.bbb'
select
when iscda = cdlista then call cdbatchwrite
when iscda = cdlistb then call cdbatchwrite
when iscda = cdlistc then call cdbatchwrite
when iscda = cdlistd then call cdbatchwrite
when iscda = cdliste then call cdbatchwrite
when iscda = cdlistf then call cdbatchwrite
when iscda = cdlistg then call cdbatchwrite
when iscda = cdlisth then call cdbatchwrite
otherwise call regbatchwrite
end
if (lines(batchlist)=0) then leave
end
call lineout batchlistb
call lineout batchlist
call SysFileDelete(batchlist)
'copy' batchlistb batchlist
call SysFileDelete(batchlistb)
return
cdbatchwrite:
numpos = lastpos('\',batchpath)
numposa = numpos + 1
cdfile = substr(batchpath,numposa)
'copy' batchpath tempath
batchpatha = tempath'\'cdfile
'attrib -r' batchpatha
call lineout batchlistb,batchpatha
return
regbatchwrite:
call lineout batchlistb,batchpath
return