Sub Button1_Click
Dim smb As String = "smb://192.168.1.1/Vz1/Vz2/meineDatei.xxx"
Log(GetFilename(smb))
Log(GetPath(smb))
End Sub
Sub GetFilename(fullpath As String) As String
Return fullpath.SubString(fullpath.LastIndexOf("/") + 1)
End Sub
Sub GetPath(Path As String) As String
Dim Path1 As String
If Path = "/" Then
Return "/"
End If
L = Path.LastIndexOf("/")
If L = Path.Length - 1 Then
'Strip the last slash
Path1 = Path.SubString2(0,L)
Else
Path1 = Path
End If
L = Path.LastIndexOf("/")
If L = 0 Then
L = 1
End If
Return Path1.SubString2(0,L)
End Sub