How to get the file name without its extension and path
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 | 'File/Folder Handling - How to get the file name without its extension and path Public Sub MyFile() 'You need to set reference to Microsoft Scripting Runtime Dim strFile As String Dim fso As Scripting.FileSystemObject Set fso = New FileSystemObject strFile = "C:\Temp\Test.txt" Debug.Print fso.GetBaseName(strFile) End Sub |