by Alex rohr (2 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sat 6th November 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Return file name only. No root path.
' remove the drive and path name
Dim i As Long, ReadChar As String
NoRoot = FTPFile
i = Len(FTPFile)
Do
ReadChar = Mid(FTPFile, i, 1)
Select Case ReadChar
Case ""
FTPFile2 = FTPFile
Case "\", ":"
FTPFile2 = Mid(FTPFile, i + 1, Len(FTPFile))
i = 0
End Select
i = i - 1
Loop Until i <= 0
End Function