-
Вот лучший и короткий путь.
Возвращает имя файла из FullPath
' ** C:\Windows\System32\calc.exe > Ret: calc.exe
Private Function GetFilenameFromPath(FullPath As String) As String
GetFilenameFromPath = Right(FullPath, Len(FullPath) - InStrRev(FullPath, "\"))
End Function
Путь возврата из FullPath
' C:\Windows\System32\calc.exe > Ret: C:\Windows\System32\
Private Function GetDirectoryFromPath(FullPath As String) As String
GetDirectoryFromPath = Left(FullPath, InStrRev(FullPath, "\"))
End Function