Michael Sterling
asked on
How do I construct my search pattern with multiple wild cards?
I'm trying to pull files from a directory into a string array. I need to match the pattern for something like this:
"*." + file extension + "*"
so i can pick up files that match this pattern:
filename1.gl
filename1.gl1
but this isn't working. any suggestions?
string[] sFiles;
sFiles = Directory.GetFiles(myGloba lVars.gsDi rectory.To String(), "*." + sLoopExt + "*");
"*." + file extension + "*"
so i can pick up files that match this pattern:
filename1.gl
filename1.gl1
but this isn't working. any suggestions?
string[] sFiles;
sFiles = Directory.GetFiles(myGloba
ASKER
I have and neither seem to work. is there another function that i can use that will except 2 parameters?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help.
Glad I could help!
Open in new window
orOpen in new window
depending on if gsDirectory includes the final "\" or notGet files only accepts one parameter, the path, AFAIK.
HTH,
Dan