| :: Get the full directory path of a file passed in |
Author |
Jim Andrews |
Language |
VB6 |
Operating
Systems |
Windows 95, 98 and NT |
| Module |
Public Function GetTheFilePath(ByVal strFile) As String
Files = Split(strFile, "\")
For I = 0 to (UBound(Files) - 1)
FilePath = FilePath & Files(I) &
"\"
Next
GetTheFilePath = FilePath
End Function |
| Usage |
'This is a very simple way to get just the full
directory path of
'a file passed in.
'example:
'MyFilePath = GetTheFilePath("C:\testing\jim\file.txt")
'will return "C:\testing\jim\" |
|
 |
|
 |