B
brian
I am using the Directory.GetFiles class and am having
problems with the overloaded version. I want to search
files. I can use the following and it works fine:
Directory.GetFiles(Path, k)
Path: c:/Test/
k: 3
It will query all files in the test directory with a file
that is named 3.
I need to add the wildcard behind it to get me all the
files in the test directory that begins with 3. If I
hardcode "3*" it works fine. But 'k' will be changing
all the time so I need a variable of string data type.
I have tried:
(Path, k*)
(Path, "k*")
(Path, k"*")
None of them work. I either get no files or blue
squigglies in other parts of my code.
Any ideas? Can you wildcard search with a paramater?
problems with the overloaded version. I want to search
files. I can use the following and it works fine:
Directory.GetFiles(Path, k)
Path: c:/Test/
k: 3
It will query all files in the test directory with a file
that is named 3.
I need to add the wildcard behind it to get me all the
files in the test directory that begins with 3. If I
hardcode "3*" it works fine. But 'k' will be changing
all the time so I need a variable of string data type.
I have tried:
(Path, k*)
(Path, "k*")
(Path, k"*")
None of them work. I either get no files or blue
squigglies in other parts of my code.
Any ideas? Can you wildcard search with a paramater?