brycetech Posted December 25, 2011 Share Posted December 25, 2011 (edited) Hi Thought I'd share this. Its not the neatest code, but it allows the comparison of directorys. Very useful for large directory comparisons...I have server directories w/ 1000s of files and need to be able to ensure that I have all of those files on the local computer periodically. hthdircompare.au3 Edited January 2, 2012 by brycetech Link to comment Share on other sites More sharing options...
Zedna Posted December 25, 2011 Share Posted December 25, 2011 Nice for the beginner! Just one advice: in savesettings/loadsettings use IniRead/IniWrite instead of FileOpen + FileReadLine/FileWriteLine Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
brycetech Posted December 26, 2011 Author Share Posted December 26, 2011 thank you for the suggestion. I'll be the first to admit that I'm bad at multidimensional arrays which seems to be the base of ini files. However, I see the advantage as it looks like its much more direct (shorter coding). thanx again... I'll be sure to give this a shot in my next script. Link to comment Share on other sites More sharing options...
Zedna Posted December 26, 2011 Share Posted December 26, 2011 Multidimensial array is needed only in IniReadSection/IniWriteSection which is not your case. For simple IniRead/IniWrite no arrays are needed. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
spudw2k Posted December 28, 2011 Share Posted December 28, 2011 I'd also recommend utilizing a hashing algo of some sorts. Very useful for finding duplicate files or perhaps even identical files with different filenames. Just my two cents. 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 BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool 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...
Zedna Posted December 28, 2011 Share Posted December 28, 2011 (edited) My advice for optimizing is to use SQLite (with memory DB). It's VERY fast compared to arrays. EDIT: some links Edited December 28, 2011 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
brycetech Posted December 29, 2011 Author Share Posted December 29, 2011 I updated the script (quite a bit). How would one go about doing a binary comparison between the two files? Link to comment Share on other sites More sharing options...
spudw2k Posted December 30, 2011 Share Posted December 30, 2011 (edited) I updated the script (quite a bit).How would one go about doing a binary comparison between the two files?I'd use a hash algo (as I mentioned before). It will give you a high level ability to examine if two files have the same binary composition, but not what the differences are between them.Personally I'd start with MD5 or SHA1 (_Crypt_HashFile example in the help file) then look into incorporating BIN funcs (binary, binarylen and binarymid have examples in the help file) if you really want to do a detailed comparison. Edited December 30, 2011 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 BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool 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...
brycetech Posted December 30, 2011 Author Share Posted December 30, 2011 thanx I'll look at that. I updated the script to remove some bugs that were in it. Link to comment Share on other sites More sharing options...
brycetech Posted January 2, 2012 Author Share Posted January 2, 2012 (edited) Updated again...fixing bugs and making more options. I tried it a while ago with the actual files I need it to compare on the server I have to work with and it now does what I need, so I doubt I'll do any more to it. thanx for suggestions. BT Edited January 2, 2012 by brycetech 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