In a post in VB 4/5/6, I question how to open a file with a wildcard as the file extension (https://www.daniweb.com/software-development/visual-basic-4-5-6/threads/488809/accessing-a-file-with-a-ever-changing-name. That worked fine for VBA. However I'm trying to do the same thing using VB.net. I'm having trouble finding the correct syntax. I hope you can help.
Specifically, I have to find a file that has a varying file extension. The file name will be the creation date. The file extension is the time the file was created. So the file name looks like this: "20141216.042615". So I need to write my code so that it will go and find "20141216.(asterisk)" or whatever the appropriate wildcard character is. I've tried
Dim RestranName = "C:\Restran Conversion\IPSDATA\PM00213A\20141210.%"
However the error in the Immediate box says "A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll". So is there an appropriate way to connect with the file?
In advance, thanks for your help.