by Kelly Ethridge (3 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 20th December 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Parse out the filepath and filename of a string and have each returned in separate variables passed in during the function call. This modifies
Dim i As Long
i = Len(FilePathAndName)
Do While Mid$(FilePathAndName, i, 1) = "\"
i = i - 1
Loop
If i = Len(FilePathAndName) Then
FileName = Mid$(FilePathAndName, InStrRev(FilePathAndName, "\") + 1)
Else
i = i + 1
End If
FilePath = Left$(FilePathAndName, InStrRev(FilePathAndName, "\", i))
End Sub
No comments have been posted about Parse out the filepath and filename of a string and have each returned in separate variables passed. Why not be the first to post a comment about Parse out the filepath and filename of a string and have each returned in separate variables passed.