by Murali Bala (7 Submissions)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 12th May 2002
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Two lines of code to extract the file name from a full file path.
Dim sFpath() As String
sFpath = Split(sPath, "\")
GetFileName = sFpath(UBound(sFpath()))
End Function
Private Sub Command1_Click()
Dim s As String
s = GetFileName("c:\ABC\Test.mdb")
MsgBox s
End Sub
No comments have been posted about Two lines of code to extract the file name from a full file path.. Why not be the first to post a comment about Two lines of code to extract the file name from a full file path..