thetinkerer
 Regular Member
 Joined: 16/06/2011 Location: AustraliaPosts: 68 |
Posted: 08:55am 20 Jun 2011 |
|
|
|
It was a long time ago but the DIR command which returned a string.
You could use it like this:
result$= DIR("*.BAS")
Do
result$=DIR()
'do something
while len(result$)>0
Essentially you give the DIR a file mask the first go and then call Dir till there are no more entries.
In fact, the MM "files" command internally works in this fashion.
I was wondering if people would find this handy to have a DIR function in MMbasic that returned a string as described? This would allow you to have programs list files and keep track of them as well as do things like
FileExists = (Len(dir$("filen.ame"))>0) etc.
|