I need to retrieve the full file name of a file that resides within a specific folder. Currently I'm using this code
Dim FileLoc As String, FileName As String
FileLoc = "\\servername\FileLocation\"
FileName = System.IO.Path.GetFileName(FileLoc)
MessageBox.Show(FileName)
However the message box is empty. The folder should have a file titled something like "DI.99990812.99999. Note that the file name is going to change each time the file is created, the only thing that won't change is the "DI" part of the file name.
Thanks in advance
Dim FileLoc As String, FileName As String
FileLoc = "\\servername\FileLocation\"
FileName = System.IO.Path.GetFileName(FileLoc)
MessageBox.Show(FileName)
However the message box is empty. The folder should have a file titled something like "DI.99990812.99999. Note that the file name is going to change each time the file is created, the only thing that won't change is the "DI" part of the file name.
Thanks in advance