從檔名中剝離副檔名

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

列印 MyFile.something

請注意,GetBaseName() 方法已經處理了檔名中的多個句點。