by W.Veldhuis (1 Submission)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 18th January 2003
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Strips filename from complete path
'**************************************************************************
'* Name : StripFileFromPath
'* Description : strips the file name from string
'* containing drive letter and path's
'* Input : Path, like "C:\WINNT\SYSTEM\TEXT.LOG"
'* Output : "TEXT.LOG"
'*-------------------------------------------------------------------------
'* Rev,Date,Who,What
'* A,18-01-2003,W.Veldhuis,Initial Version
'**************************************************************************
For i = Len(path) To 0 Step -1
If Mid(path, i, 1) <> "\" Then
StripFileFromPath = Mid(path, i, 1) + StripFileFromPath
Else
Exit For
End If
Next i
End Function