Function Get Filename from File Path

Function:

Function GetFilenameFromPath(ByVal strPath As String) As String
On Error GoTo errorhandler
If Right$(strPath, 1) <> “\” And Len(strPath) > 0 Then
GetFilenameFromPath = GetFilenameFromPath(Left$(strPath, Len(strPath) – 1)) + Right$(strPath, 1)
End If
errorhandler:
Exit Function
End Function

How to Use It:

The above function will return a file name with its extension. It returns the rightmost characters of a string up to, but not including the rightmost ‘\’. You can call this function as:

Dim myPath as String

myPath = “C:\myFolder\MyDoc.doc”

call GetFilenameFromPath(myPath)

it will return “MyDoc.doc”
http://djpaulkom.tv/dj-paul-weekly-mix-week-6/ viagra buy uk But with a jelly, all that he needs to able obtain and maintain an erection. Each form, ranging from the tablet to jelly, is prepared under proper surveillance of spepurchase levitra djpaulkom.tvts so that it is useful to us. Your brain registers this nerve pressure as djpaulkom.tv order generic cialis pain, which results in poor erections during intercourse. So before altering they will read rel=”nofollow” viagra wholesale and afterwards they will read rel=”external”.


Related posts