wtisystems
asked on
Finding the first entry in a directory with a vb.net control
My previous question was not worded correctly.
How do I find the first entry for a specific key in a directory using a vb.net control?
I think it's the "OpenFileDialog" control but I can't get it to work.
For example,
Directory Entries:
aafile1.txt
aafile2.txt
aafile3.txt
bbfile1.txt
bbfile2.txt
ccfile1.txt
ccfile2.txt
ccfile3.txt
I want to find bbfile1.txt.
I know the entires begin with "bb", but I don't know the exact names of the files.
Thank you.
How do I find the first entry for a specific key in a directory using a vb.net control?
I think it's the "OpenFileDialog" control but I can't get it to work.
For example,
Directory Entries:
aafile1.txt
aafile2.txt
aafile3.txt
bbfile1.txt
bbfile2.txt
ccfile1.txt
ccfile2.txt
ccfile3.txt
I want to find bbfile1.txt.
I know the entires begin with "bb", but I don't know the exact names of the files.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
"Files" represents the friendly name the user would see in the file-type selection drop-down and "t*" represents the search pattern. For the search pattern, you could do something like "*.txt" to only show the text files in the working directory of the OpenFileDialog.
You can also specify multiple criteria using the bottom line in the sippet. (The semicolon separates the different file types.)
Open in new window