Find file

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
SebMcClouth
Veteran
Posts: 240
Joined: Fri Apr 29, 2005 2:20 am
Location: Inside the Matrix

Find file

Post by SebMcClouth »

How can I find a certain file with PDS?

Not that good yet with PDS.

grtz
Seb
I know why you're here. I know what you've been doing... why you hardly sleep, why you live alone, and why night after night, you sit by your computer...<br>
Unfortunately, no one can be told what Qbinux is. You have to see it for yourself.
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

There's no easy way per say.. but:

Code: Select all

search$ = "*.BAS"
ret$ = DIR$(search$)
While ret$ <> ""
  Print ret$
  
  ret$ = DIR$()
Wend
Will find and list all .BAS files in the CURRENT directory..

DIR$() can take paths:
ret$ = DIR$("Somepath\What\Path\somefile.ext")

And as you can see, it can work without *


The DIR$() command exist on PDS only, not Q.B. 4.5
I have left this dump.
Post Reply