Terenz Posted October 1, 2014 Share Posted October 1, 2014 Hello guys If i need to compare two files and see if they are equal, what is best method? For CRC32 there are some example, Byte by Byte is pratically FileRead. Thanks Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
JohnOne Posted October 1, 2014 Share Posted October 1, 2014 md5 Radiance 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Radiance Posted October 1, 2014 Share Posted October 1, 2014 md5 This is a pretty good method. Be aware that getting a md5 checksum can take quite long if you're using big files (> 100 MB). If you just want to check if a file has been modified, you can use FileGetTime. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 1, 2014 Moderators Share Posted October 1, 2014 Radiance,Given that AutoIt has a FileSetTime function I would not recommend the file modification date as a sensible check on whether file modification has occurred. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Radiance Posted October 1, 2014 Share Posted October 1, 2014 M23, this is a pretty paranoid way of thinking (not in a bad way) and also of course correct. I just assumed he was the only one using AutoIt on his file(s), so if he had used FileSetTime, he would probably know. Link to comment Share on other sites More sharing options...
Terenz Posted October 1, 2014 Author Share Posted October 1, 2014 (edited) FileGetTime is not accurate, date can be changed. MD5 is too slow for this reason i have think CRC32 or Byte by Byte, maybe partially. Edited October 1, 2014 by Terenz Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
spudw2k Posted October 3, 2014 Share Posted October 3, 2014 (edited) Hashes are great to determine if the files are unique distinct or identical, byte by byte is best for actual comparision. Depends on what you are really trying to accomplish. Dealing with large files there's going to be an increase in processing no matter what method you use. Edited October 5, 2014 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now