So, I know in the following code example, it checks if a file exists (full file name) ...
If My.Computer.FileSystem.FileExists("C:\Temp\Test.cfg") Then MsgBox("File found.") Else MsgBox("File not found.") End If
... But what about if a part of the file exists? There is no standard naming convention for files, but they will always have a .cfg extension.
So, I want to check if C: \ Temp contains a * .cfg file, and if it exists, do something, and do something else.
source share