*** Quoting James Goldbloom to All dated 07-16-95 ***
> ON ERROR GOTO TRAP5
> count=1
> chdir netmail2$
> a$=dir$ ("*.MSG"):if a$="" then count=0:goto DIRTMP
> nm$(1)=a$
> do until a$="" or count=8000
> a$=dir$
> if a$"" then count=count+1:nm$(count)=a$
> loop
Hmmmm... That should work ok. Another approach comes to mind too:
-------------------------------------------------------
ON ERROR GOTO DUMMYTRAP
COUNT=0
CHDIR NETMAIL2$
GOTO BYPASS
DUMMYTRAP:
RESUME GETMSGS
BYPASS:
DO UNTIL COUNT=8000
GETMSGS:
INCR COUNT
A$=MID$(STR$(COUNT),2)+".MSG"
OPEN A$ FOR INPUT AS #1
CLOSE#1
INCR MSGNUMBER
NM$(MSGNUMBER)=A$
LOOP
-------------------------------------------------------
This way is sloppy, uses GOTO's more than I like, and abuses that
poor ON ERROR statement, but at least it works!
--- Why settle for less?
---------------
* Origin: The Blue Light Special 810-542-6619 Ferndale, MI (1:2202/6969)
|