Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Compare file if it identical or not

$
0
0

I would like to compare file if it identical or not.

I dont want to compare it by comparing byte by byte.

 

I'm thinking to use MD5 for this. Is this a good idea?

 

Something like:

 

$file = "c:\windows\regedit.exe" $filedate = FileGetTime ($file) $filesize = FileGetSize ($file) $filecheck = $file1 & $filedate & $filesize   $md5 = _Crypt_HashData($filecheck, $CALG_MD5)   If $md5 <> $filecheck2 then    msgbox(0,"","File is different") Else   msgbox(0,"","File is same") EndIf

 

$filecheck2 also calculate using the same method.

 

Is this a good method?


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>