How to: Determine a File's Extension in Visual Basic
Thereturns the names of files as a read-only collection of strings, which can be parsed with the .
To determine a file's extension
Retrieve the file path or name of the file and the Split function to determine the extension by supplying the delimiter. This example uses the GetFiles method to return the collection of file names in the directory testDirectory and reports each file's extension.