VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Return file name only. No root path.

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.

Rate 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


Download this snippet    Add to My Saved Code

Return file name only. No root path. Comments

No comments have been posted about Return file name only. No root path.. Why not be the first to post a comment about Return file name only. No root path..

Post your comment

Subject:
Message:
0/1000 characters