Filename only from a path
Ever wanted to extract a filename only from a path including the filename, well this simple function will do it for you! (I know its not ground breaking but its simple easy and useful)
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
Function get_filename_only(filepath)
For x = Len(filepath) To 1 Step -1
If Mid(filepath, x, 1) = "\" Then
get_filename_only = Right(filepath, Len(filepath) - x)
Exit Function
End If
Next x
get_filename_only = "Please check filepath it may be incorrect)"
End Function
Upload
Original Comments (3)
Recovered from Wayback Machine