A
andywirtanen
Hello,
I was wondering if it was possible to search filenames under a
directory using Dir$() or if I would have to use If and Instr
statements to search individual filenames.
In other words, I have a directory, in which there are a bunch of files
with filenames that all begin with the same pattern. I want to grab
only those
files and not have to search the entire directory.
Here's what I tried:
While Dir$("C:\theDirectory\" & theSearchTerm & "*.*") <> ""
' Do stuff
Wend
Thanks,
Andy
I was wondering if it was possible to search filenames under a
directory using Dir$() or if I would have to use If and Instr
statements to search individual filenames.
In other words, I have a directory, in which there are a bunch of files
with filenames that all begin with the same pattern. I want to grab
only those
files and not have to search the entire directory.
Here's what I tried:
While Dir$("C:\theDirectory\" & theSearchTerm & "*.*") <> ""
' Do stuff
Wend
Thanks,
Andy