How to overwrite local files?
Hi,
I have 2 files - 1 on the network and the other on my local drive.
They have the same name. I want to be able to compare their creation/change dates and if the network one is newer than the local one I want to be able to overwrite the local one with the file from the network. Here is what I have so far, but it doesn't seem to work
on XP:
My form has 1 OLE2 control.
Private Sub Form_Load()
Dim sysdrive
Dim v As Variant
v = "SYSTEMDRIVE"
sysdrive = Environ(CStr(v))
If DateDiff("h", FileDateTime(sysdrive & "c:\myfile.txt"), FileDateTime("\\somenetworkpath\myfile.txt")) > 0 Then OLE2.DoVerb
End
End Sub
|