korenza, примерно так:
Код:
![Выделить весь код](images/misc/selectcode.png)
Set oFSO = CreateObject("Scripting.FileSystemObject")
WScript.Echo FileCompare("C:\test1","C:\test2")
Function FileCompare(sFile1, sFile2)
Dim oStream, buf1, buf2
FileCompare = vbFalse
If oFSO.FileExists(sFile1) And oFSO.FileExists(sFile2) Then
Set oStream=WScript.CreateObject("ADODB.Stream")
oStream.Open:oStream.Type=1
oStream.LoadFromFile(sFile1):buf1 = oStream.Read
oStream.LoadFromFile(sFile2):buf2 = oStream.Read
oStream.Close
If UBound(buf1)=UBound(buf2) Then
buf1=CStr(buf1):buf2=CStr(buf2)
If StrComp(buf1,buf2,0)=0 Then FileCompare=vbTrue:Exit Function
End If
End If
End Function