How to extract a file name from one path.
How to extract a file name from one path.
API Declarations
Dim i As Integer
Rate How to extract a file name from one path.
(1(1 Vote))
commonDialog1.ShowOpen
nameFile = Mid$(commonDialog1.FileName, 4) 'removes "C:\"
Do
If InStr(1, nameFile, "\") Then 'verifies if there is any "\"
'Yes. It does exist "\"
i = InStr(1, nameFile, "\")
nameFile = Mid$(nameFile, i + 1)
End If
Loop Until InStr(1, nameFile, "\") = False
How to extract a file name from one path. Comments
No comments yet — be the first to post one!
Post a Comment