home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ANews 1
/
AnewsCD01.iso
/
Internet
/
Newsgroup
/
THOR_2.6
/
THOR26_AREXX.LHA
/
Rexx
/
Examples
/
CountFiles.br
< prev
next >
Wrap
Text File
|
1999-01-17
|
890b
|
51 lines
/* $VER: CountFiles.br 1.0 (5.9.97)
*
* Count the files in a file database..
*/
parse arg argument
if(argument = '') then
do
say '$VER: CountFiles.br V3.1 (27.01.95)'
say 'Template: BBSNAME/A'
exit
end
if ~show('p', 'BBSREAD') then do
address command
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
end
address BBSREAD
GETFAREALIST stem FAREALIST argument
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
files = 0
say 'Available file areas:'
do i=1 to FAREALIST.COUNT
GETFAREADATA fareaname FAREALIST.i stem FAREADATA argument
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
say ' ' || left(FAREALIST.i,20) || right(FAREADATA.NUMFILES, 6)
files = files + FAREADATA.NUMFILES
end
say left("",21) || "------"
say right("Sum: ", 21) || right(files, 6)
say left("",21) || "======"
exit