Attribute VB_Name = "Globals_Functions"
Option Explicit
Option Compare Text

Global FileName1 As String
Global FileName2 As String
Global DataFile1 As Integer
Global DataFile2 As Integer
Global RightLast As Boolean


Public Function GetDrive(ByVal Directory As String) As String
Dim I As Integer

    For I = 1 To Len(Directory)
        
        If Mid$(Directory, I, 1) = "\" Then
            GetDrive = Left$(Directory, I)
            Exit Function
        End If
    Next
    GetDrive = ""
    Exit Function
    
End Function

Public Function GetDir(ByVal PathName As String) As String
Dim I As Integer

    For I = Len(PathName) To 1 Step -1
        
        If Mid$(PathName, I, 1) = "\" Then
            GetDir = Left$(PathName, I)
            Exit Function
        End If
    Next
    GetDir = ""
    Exit Function
    
End Function
