I have a few files named like:
StreamReader needs the EXACT name of the file. You can, however, use
Directory.GetFiles to find the file you are looking for:
var files = Directory.GetFiles(@"C:\Some\Directory", "6327_1-SWD???-171016_1.txt"); // C# Dim files = Directory.GetFiles("C:\Some\Directory", "6327_1-SWD???-171016_1.txt") ' VB
files then contains an array of all file names (including the path) matching your pattern.
Directory.GetFiles supports the
(Unrelated side note: Check out
File.ReadAllText. Usually, you don't need a StreamReader to read a text file's contents anymore. Note that those methods need the full file name as well.)