VB Code:
Option Explicit
Const path1 = "c:\test.txt"
Const path2 = "c:\README FIRST.txt"
Private Sub Form_Load()
Dim file1 As String, file2 As String, ans As Integer
'*'*'*'get date and time for each file'*'*'*'
file1 = FileDateTime(path1) '' this will be the server one
file2 = FileDateTime(path2)
'*'*'*'start comparison'*'*'*'
If Format(file1, "yyyy") = Format(file2, "yyyy") Then
If Format(file1, "mm") = Format(file2, "mm") Then
If Format(file1, "dd") = Format(file2, "dd") Then
If Format(file1, "hh") = Format(file2, "hh") Then
If Format(file1, "min") = Format(file2, "min") Then
MsgBox "Same File"
Exit Sub
End If
End If
End If
End If
End If
MsgBox "Not Same - Update"
End Sub