Public Function SeparatePathAndFile( _ ByRef rPathName As Variant _ , ByRef rFileName As Variant _ , ByVal vPathName As Variant _ ) As Boolean
vPathName rPathName rFileName --------------------- --------------- ------------- C:\ C:\ C:\Temp C:\ Temp C:\Temp\Win.Tmp C:\Temp Win.Tmp \\SJS4\C\Temp\Win.Tmp \\SJS4\C\Temp Win.Tmp \\SJS4\Entisoft\Tools \\SJS4\Entisoft ToolsExample:
Assuming Dim strPath As String Dim strFile As String for example SeparatePathAndFile(strPath, strFile, "\\SJS4\Entisoft\Tools") = True leaves strPath = "\\SJS4\Entisoft" strFile = "Tools"See also:
SeparatePathAndFileSample Subroutine SeparateDriveAndPath Function SeparatePrefixAndExtension Function CombinePathAndFile FunctionrPathName: String or Variant that will receive the drive and directory path portions of vPathName.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.