|
| |
Code Sample: GetPath Function
|
Public
Function GetPath(PathIn)
'=============================================
'PURPOSE: Returns the Path of the file
' from the full path
and FileName or the
' Parent directory from
a path and
' directory name
(without trailing "\")
'PARAMS: FileName File name with full path
'RETURNS: File Name
'=============================================
Dim Position
For Position = Len(PathIn) To 1 Step -1
If
InStr("\", Mid(PathIn, Position, 1)) Then Exit For
Next
GetPath = Mid(PathIn, 1, Position)
End Function |
|
|