1
Answer

How can I use wildcards in the file path

danco63

danco63

20y
2.2k
1
I would like to open a file using streamreader, which I can do just fine as long as I know the exact file name. The problem is the file name changes (i.e. the date is part of the file name)slightly and I want to use a wild card in the path. VB.Net will not allow the typical "*" wildcard. I tried using the Rename function but the same exception error happens. Why can DOS do a simple rename with code as as simple as ">rename C:\*.txt C:\newname.txt" but VB.Net can't do it? Any ideas??
Answers (1)