VBA Scripting.FileSystemObject Strip file extension from a file name


Example

Dim fso As New Scripting.FileSystemObject
Debug.Print fso.GetBaseName("MyFile.something.txt")

Prints MyFile.something

Note that the GetBaseName() method already handles multiple periods in a file name.