1. Don: Compare Directories and Files
- Posted by Al Getz <Xaxo at aol?com> Jul 06, 2007
- 678 views
- Last edited Jul 07, 2007
don cole wrote: > > Al Getz wrote: > > > > don cole wrote: > > > > > > Hello Everybody, > > > > > > I am working on and wonder if anyone else has written a program that > > > compares > > > as such. > > > > > > [Part 1] > > > Directory A to Directory B. > > > > > > The following files have the same name and length. > > > > > > The following files are different. > > > > > > [Part 2] > > > File A to File B. > > > > > > The files are exactly the same. > > > > > > or > > > > > > File A is different from File B at line 2007 in that it has been changed > > > from puts(1,"&&&") > > > to puts(1,"***"). > > > > > > > > > I'm using Combos to do this. Has it been done? Any ideas? > > > > > > > > > Don Cole > > > > Hi Don, > > > > Yes, i had made a program like this to verify CD burns. > > If i remember right, it will parse directories and sub directories > > and compare those on one drive with those on another drive and > > report any differences in bytes in any of the files it finds, > > or if any files are missing or added. > > I dont think it would be too hard to make it compare directories on > > the same drive though, with a small amount of code change. > > > > Another program i have does only one directory at a time, which > > you enter in as a Euphoria sequences like Dir1="C:\MyDir" and > > Dir2="C:\MyOtherDir" or something like that. > > > > > > Al > > > > E boa sorte com sua programacao Euphoria! > > > > > > My bumper sticker: "I brake for LED's" > > > > Thanks Al, > > Sorry it to so long to get back to you. > > Don Cole So does that mean you want the program or no? :) Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
2. Re: Don: Compare Directories and Files
- Posted by don cole <doncole at pacbe?l.net> Jul 07, 2007
- 658 views
Al Getz wrote: > > don cole wrote: > > > > Al Getz wrote: > > > > > > don cole wrote: > > > > > > > > Hello Everybody, > > > > > > > > I am working on and wonder if anyone else has written a program that > > > > compares > > > > as such. > > > > > > > > [Part 1] > > > > Directory A to Directory B. > > > > > > > > The following files have the same name and length. > > > > > > > > The following files are different. > > > > > > > > [Part 2] > > > > File A to File B. > > > > > > > > The files are exactly the same. > > > > > > > > or > > > > > > > > File A is different from File B at line 2007 in that it has been changed > > > > from puts(1,"&&&") > > > > to puts(1,"***"). > > > > > > > > > > > > I'm using Combos to do this. Has it been done? Any ideas? > > > > > > > > > > > > Don Cole > > > > > > Hi Don, > > > > > > Yes, i had made a program like this to verify CD burns. > > > If i remember right, it will parse directories and sub directories > > > and compare those on one drive with those on another drive and > > > report any differences in bytes in any of the files it finds, > > > or if any files are missing or added. > > > I dont think it would be too hard to make it compare directories on > > > the same drive though, with a small amount of code change. > > > > > > Another program i have does only one directory at a time, which > > > you enter in as a Euphoria sequences like Dir1="C:\MyDir" and > > > Dir2="C:\MyOtherDir" or something like that. > > > > > > > > > Al > > > > > > E boa sorte com sua programacao Euphoria! > > > > > > > > > My bumper sticker: "I brake for LED's" > > > > > > > Thanks Al, > > > > Sorry it to so long to get back to you. > > > > Don Cole > > So does that mean you want the program or no? :) > > Al > > E boa sorte com sua programacao Euphoria! > > > My bumper sticker: "I brake for LED's" > Why yes Al, I was poking around the Archives for them. Silly me, I never thought to ask you. Don Cole
3. Re: Don: Compare Directories and Files
- Posted by Al Getz <Xaxo at aol.c?m> Jul 07, 2007
- 660 views
Hi again, Ok let me clean up the source files a bit and submit. Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
4. Re: Don: Compare Directories and Files
- Posted by don cole <doncole at pacbell.ne?> Jul 07, 2007
- 625 views
- Last edited Jul 08, 2007
Al Getz wrote: > > Hi again, > > > Ok let me clean up the source files a bit and submit. > > > Al > > E boa sorte com sua programacao Euphoria! > > > My bumper sticker: "I brake for LED's" > Hello Al, You could just email 'em. Don Cole
5. Re: Don: Compare Directories and Files
- Posted by don cole <doncole at pac?ell.net> Jul 08, 2007
- 621 views
Al Getz wrote: > > Hi again, > > > Ok let me clean up the source files a bit and submit. > > > Al > > E boa sorte com sua programacao Euphoria! > > > My bumper sticker: "I brake for LED's" > Hello Al, What !!! do you mean they're not ready yet ? {I couldn't resist) Don Cole
6. Re: Don: Compare Directories and Files
- Posted by Al Getz <Xaxo at a?l.com> Jul 08, 2007
- 606 views
don cole wrote: > > Al Getz wrote: > > > > Hi again, > > > > > > Ok let me clean up the source files a bit and submit. > > > > > > Al > > > > E boa sorte com sua programacao Euphoria! > > > > > > My bumper sticker: "I brake for LED's" > > > > Hello Al, > > What !!! do you mean they're not ready yet ? > > {I couldn't resist) > > > Don Cole He he... When i dont plan on releasing a program i typically leave lots of old notes in with the files. Also, i wanted to do a Debug run (one of my other programs) to have all the included files printed out so i can zip them up with the main file. BTW i dont think i have your email around, what is it again? Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
7. Re: Don: Compare Directories and Files
- Posted by don cole <doncole at pa?bell.net> Jul 09, 2007
- 626 views
Al Getz wrote: > > don cole wrote: > > > > Al Getz wrote: > > > > > > Hi again, > > > > > > > > > Ok let me clean up the source files a bit and submit. > > > > > > > > > Al > > > > > > E boa sorte com sua programacao Euphoria! > > > > > > > > > My bumper sticker: "I brake for LED's" > > > > > > > Hello Al, > > > > What !!! do you mean they're not ready yet ? > > > > {I couldn't resist) > > > > > > Don Cole > > He he... > > When i dont plan on releasing a program i typically leave lots > of old notes in with the files. > Also, i wanted to do a Debug run (one of my other programs) to > have all the included files printed out so i can zip them up > with the main file. > > BTW i dont think i have your email around, what is it again? > > > Al > > E boa sorte com sua programacao Euphoria! > > > My bumper sticker: "I brake for LED's" > Hello again Al, I don't know if there is any great rush on this. I'm writing a windows compare program in two parts. 1) compare folder and 2) compare files. I'm doing this with combo boxes so I don't have keep entering file and folder names. The folder part I got ok, it gives me a list of all the files that are the same and and list of all the files that are different. Now when it comes to files it is much more complicated. I found a program in the Archives that does this diff.zip by R. M. Forno. My main goal is to compare different versions of Arwen to to see haw to place color tabs. Forno's diff works fine on small test programs but when I tried to compare 2 versions of Arwen it took too long. So I left it running all night. He has 4 versions and four options to go with each ver. (I haven't tried them all. I only tried one.) Next day it was still running. Maybe what I am tring to do is an imposible task. Regardless, I would like to see your code. You can see it to the easily hacked email address that shows up in every post. doncole at pacbell.net. [OT]Speaking of pacbell(Park) now AT&T(Park) they're having the All Star Game there this week and I'm already sick of the news coverage. Don Cole
8. Re: Don: Compare Directories and Files
- Posted by Alan Oxley <fizzpop at axxess.co.z?> Jul 09, 2007
- 622 views
Hi Don, Maybe this method will be faster: 1. Sort both listings, seperately 2. Have a routine that steps through both lists, comparing. a) Grab one record each from list1 and list2 b) if two records are equal, go back to (a). c) If the record in list1 is greater than the record in list2, then the record in list2 is missing from list1; assume that the list1 record is a new one. Write it, get another record from list2, goto (a) d) Same as (c) but transpose the 2 lists I have an example of this in the archive, it speeds through megabytes of data in less than a second, if the data is in cache. See "difflist" by me. Cheers Alan
9. Re: Don: Compare Directories and Files
- Posted by Alan Oxley <fizzpop at axxess.co.z?> Jul 09, 2007
- 617 views
Oops - my algo had an error in point (c). It should read: c) If the record in list1 is greater than the record in list2, then the record in list2 is missing from list1; assume that the list1 record is a new one. Write it, get another record from list2, goto (*b*) Regards Alan
10. Re: Don: Compare Directories and Files
- Posted by Al Getz <Xaxo at a?l.com> Jul 09, 2007
- 610 views
don cole wrote: > > Al Getz wrote: > > > > don cole wrote: > > > > > > Al Getz wrote: > > > > > > > > Hi again, > > > > > > > > > > > > Ok let me clean up the source files a bit and submit. > > > > > > > > > > > > Al > > > > > > > > E boa sorte com sua programacao Euphoria! > > > > > > > > > > > > My bumper sticker: "I brake for LED's" > > > > > > > > > > Hello Al, > > > > > > What !!! do you mean they're not ready yet ? > > > > > > {I couldn't resist) > > > > > > > > > Don Cole > > > > He he... > > > > When i dont plan on releasing a program i typically leave lots > > of old notes in with the files. > > Also, i wanted to do a Debug run (one of my other programs) to > > have all the included files printed out so i can zip them up > > with the main file. > > > > BTW i dont think i have your email around, what is it again? > > > > > > Al > > > > E boa sorte com sua programacao Euphoria! > > > > > > My bumper sticker: "I brake for LED's" > > > > Hello again Al, > > I don't know if there is any great rush on this. I'm writing a windows > compare > program in two parts. 1) compare folder and 2) compare files. I'm doing this > with combo boxes so I don't have keep entering file and folder names. The > folder > part I got ok, it gives me a list of all the files that are the same and and > list of all the files that are different. > > Now when it comes to files it is much more complicated. I found a program > in the Archives that does this diff.zip by R. M. Forno. My main goal is to > compare > different versions of Arwen to to see haw to place color tabs. > > Forno's diff works fine on small test programs but when I tried to compare > 2 versions of Arwen it took too long. So I left it running all night. > He has 4 versions and four options to go with each ver. (I haven't tried > them > all. I only tried one.) > > Next day it was still running. Maybe what I am tring to do is an imposible > task. > Regardless, I would like to see your code. You can see it to the easily > hacked > email address that shows up in every post. doncole at pacbell.net. > > [OT]Speaking of pacbell(Park) now AT&T(Park) they're having the All Star Game > there this week and I'm already sick of the news coverage. > > > Don Cole Hi again Don, Comparing files really isnt hard at all. Since the bytes can be different however, all the bytes must be compared. This is especially important when comparing files on the hard drive to files on a recorded CD or DVD disk because those files could be corrupt by only 1 single byte and that could screw up the system reading of the entire file. I've actually had this happen a few times, so that's why this program came about. The program makes a list of all the files to be checked, then goes through them one by one checking each and every byte. If there is even one byte that is not the same or if one file has even one single byte less than the other an error gets written to the Report.txt file that says what the file name is and it's location. Just a few weeks ago while i was trying out some new brand CD's (that i never used before) i had some 6000 files record just perfectly on CD, while 3 had corrupt bytes. I found that out later, but what happened was i went to copy the files on CD back to the hard drive and i got an error when the system copy got to one file that would not copy and took a real long time to provide the error message "could not read from disk" or something like that. At that point, the system copy stopped altogether so any files that were not copied up to that point were simply not copied either, even though those files were ok. I eventually got the stuff copied, but after it finally went through all the files there were 3 files that were corrupt. Luckily i wasnt depending on that data for anything important as i still had the hard drive copies. Now, i verify every file that gets recorded either using this program or Nero verify. (Oh yeah another reason for this program is that the old Nero 'verify' i had would cause an exception if there were too many files in one directory. Ahead made an update now though, but it's no big deal at this point and i pretty much like using my own programs better anyway). The code i will send you has been checked to make sure all the includes get included in the zip. It's basically DOS oriented though, but it's still easy to use. I was thinking of doing a windows interface too btw. That would be neat. For now, the directory and two drive letters get inserted into lines in the Eu program source file. Since the program can look down into sub dirs it only takes a few seconds to use anyway. Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
11. Re: Don: Compare Directories and Files
- Posted by CChris <christian.cuvier at ag?iculture.gouv.fr> Jul 09, 2007
- 613 views
don cole wrote: > > Al Getz wrote: > > > > don cole wrote: > > > > > > Al Getz wrote: > > > > > > > > Hi again, > > > > > > > > > > > > Ok let me clean up the source files a bit and submit. > > > > > > > > > > > > Al > > > > > > > > E boa sorte com sua programacao Euphoria! > > > > > > > > > > > > My bumper sticker: "I brake for LED's" > > > > > > > > > > Hello Al, > > > > > > What !!! do you mean they're not ready yet ? > > > > > > {I couldn't resist) > > > > > > > > > Don Cole > > > > He he... > > > > When i dont plan on releasing a program i typically leave lots > > of old notes in with the files. > > Also, i wanted to do a Debug run (one of my other programs) to > > have all the included files printed out so i can zip them up > > with the main file. > > > > BTW i dont think i have your email around, what is it again? > > > > > > Al > > > > E boa sorte com sua programacao Euphoria! > > > > > > My bumper sticker: "I brake for LED's" > > > > Hello again Al, > > I don't know if there is any great rush on this. I'm writing a windows > compare > program in two parts. 1) compare folder and 2) compare files. I'm doing this > with combo boxes so I don't have keep entering file and folder names. The > folder > part I got ok, it gives me a list of all the files that are the same and and > list of all the files that are different. > > Now when it comes to files it is much more complicated. I found a program > in the Archives that does this diff.zip by R. M. Forno. My main goal is to > compare > different versions of Arwen to to see haw to place color tabs. > > Forno's diff works fine on small test programs but when I tried to compare > 2 versions of Arwen it took too long. So I left it running all night. > He has 4 versions and four options to go with each ver. (I haven't tried > them > all. I only tried one.) > > Next day it was still running. Maybe what I am tring to do is an imposible > task. > Regardless, I would like to see your code. You can see it to the easily > hacked > email address that shows up in every post. doncole at pacbell.net. > > [OT]Speaking of pacbell(Park) now AT&T(Park) they're having the All Star Game > there this week and I'm already sick of the news coverage. > > > Don Cole Try WinDiff from the Archive, or better GNU diffutils for Win32 (Google for that to find the sourceforge page, I don't remember it OTOH). CChris
12. Re: Don: Compare Directories and Files
- Posted by Alan Oxley <fizzpop at axxes?.co.za> Jul 09, 2007
- 606 views
Hi Don, Can you give me a link where I can download 2 sample filelistings that you wish to compare? Or even mail them to me, zipped. I'll run my program against it and give you the results plus timings. You've got nothing to lose. Regards Alan
13. Re: Don: Compare Directories and Files
- Posted by don cole <doncole at pacbell.ne?> Jul 09, 2007
- 654 views
- Last edited Jul 10, 2007
Alan Oxley wrote: > > Hi Don, > > Can you give me a link where I can download 2 sample filelistings > that you wish to compare? Or even mail them to me, zipped. > > I'll run my program against it and give you the results plus timings. > You've got nothing to lose. > > Regards > Alan Hello Alan, http://palacebuilders.pwp.blueyonder.co.uk/edita.htm#download I'm only interested in Arwen at this time. Conmpare it with any old Arwens you may have. If you don't have any, download 'Arwen win32 library' by Mike. That's in the Archives. Thanks for your help. Don Cole
14. Re: Don: Compare Directories and Files
- Posted by don cole <doncole at pacbell.n?t> Jul 09, 2007
- 635 views
- Last edited Jul 10, 2007
Alan Oxley wrote: > > Hi Don, > Maybe this method will be faster: > 1. Sort both listings, seperately > 2. Have a routine that steps through both lists, comparing. > a) Grab one record each from list1 and list2 > b) if two records are equal, go back to (a). > c) If the record in list1 is greater than the record in list2, then > the record in list2 is missing from list1; assume that the list1 > record is a new one. Write it, get another record from list2, goto (a) > d) Same as (c) but transpose the 2 lists > > I have an example of this in the archive, it speeds through megabytes of data > in less than a second, if the data is in cache. See "difflist" by me. > > Cheers > Alan Hello again Alan, I forgot to mention you have two difflist files in the Archives, which one should I download? Don Cole
15. Re: Don: Compare Directories and Files
- Posted by Pete Lomax <petelomax at blueyonder.?o.uk> Jul 10, 2007
- 623 views
don cole wrote: > diff.zip by R. M. Forno. My main goal is to compare > different versions of Arwen to to see haw to place color tabs. > > Forno's diff works fine on small test programs but when I tried to compare > 2 versions of Arwen it took too long. So I left it running all night. > Next day it was still running. Maybe what I am tring to do is an imposible > task. ... >Hello Alan, > > http://palacebuilders.pwp.blueyonder.co.uk/edita.htm#download > > I'm only interested in Arwen at this time. Compare it with any old/ > download 'Arwen win32 library' by Mike. Don, what is the problem? It /is/ a tough compare, and while I am sure a windows port of the unix command-line diff runs much quicker, even on this crappy box, Edita solves this in 17 mins, at 2006 differences [see PPPS] and a complexity of ~5.8 million (meaning that in those 17 mins it logged 5.8 million decision points before finding the optimal answer) but it got there. Is there something wrong with the Edita file compare output? Is there something wrong with coloured tabs in Edita? If you failed to understand the source mods I posted what makes you think you will understand a source diff anyway? Is there something in the new Arwen you need in the one I ship with Edita? Confused, Pete PS to Alan Oxley: I would be interested in your results but I have to warn you I spent much time investigating source comparision and would be (pleasantly) surprised to see my code beat, on the same kit that is. PPS to Al Getz: I fell off my chair laughing at your "Comparing files really isnt hard at all." - obviously "are these files binary identical?" is what you probably meant, but "shortest edit difference" has kept some very bright acedemics awake at night long time now and still will for some time yet. PPPS If you can prove it is even one less than 2006, please let me know. PPPPS I just want to say that 17 mins is directly related to the 2006 differences; were there only 100 it should get it done in under a second.
16. Re: Don: Compare Directories and Files
- Posted by don cole <doncole at pacbell?net> Jul 10, 2007
- 617 views
Pete Lomax wrote: > > don cole wrote: > > diff.zip by R. M. Forno. My main goal is to compare > > different versions of Arwen to to see haw to place color tabs. > > > > Forno's diff works fine on small test programs but when I tried to compare > > 2 versions of Arwen it took too long. So I left it running all night. > > Next day it was still running. Maybe what I am tring to do is an imposible > > task. > ... > >Hello Alan, > > > > <a > > href="http://palacebuilders.pwp.blueyonder.co.uk/edita.htm#download">http://palacebuilders.pwp.blueyonder.co.uk/edita.htm#download</a> > > > > I'm only interested in Arwen at this time. Compare it with any old/ > > download 'Arwen win32 library' by Mike. > > Don, what is the problem? It /is/ a tough compare, and while I am sure a > windows > port of the unix command-line diff runs much quicker, even on this crappy box, > Edita solves this in 17 mins, at 2006 differences [see PPPS] and a complexity > of ~5.8 million (meaning that in those 17 mins it logged 5.8 million decision > points before finding the optimal answer) but it got there. > > Is there something wrong with the Edita file compare output? > > Is there something wrong with coloured tabs in Edita? Apparently you have uploaded a new version of Edita. (The old one didn't have coloed tabs.) > > If you failed to understand the source mods I posted what makes you think you > will understand a source diff anyway? Oh yes! I'm very smart. > > Is there something in the new Arwen you need in the one I ship with Edita? > > Confused, > Pete > > PS to Alan Oxley: I would be interested in your results but I have to warn you > I spent much time investigating source comparision and would be (pleasantly) > surprised to see my code beat, on the same kit that is. > > PPS to Al Getz: I fell off my chair laughing at your "Comparing files really > isnt hard at all." - obviously "are these files binary identical?" is what you > probably meant, but "shortest edit difference" has kept some very bright > acedemics > awake at night long time now and still will for some time yet. > > PPPS If you can prove it is even one less than 2006, please let me know. > > PPPPS I just want to say that 17 mins is directly related to the 2006 > differences; > were there only 100 it should get it done in under a second. Sorry Pete, But I can't spend anymore time on this post as I have to download the new version of Edita and check out those colored tabs. Don Cole
17. Re: Don: Compare Directories and Files
- Posted by Alan Oxley <fizzpop at ax?ess.co.za> Jul 10, 2007
- 604 views
OK Don, the July 13th 2007, difflist v3.0 is the later one. I'm going to change that program a bit to better fit your needs. (Strip unneeded features and change some titles etc) I assume you would like something that says: Line 64281 added: " source code line here" Line 436 removed: " other source line here" etc, etc? Plus totals of lines added and removed. Yes? Assuming yes, will do today and send you the results. BTW, my algorithm is not really affected by the number of differences. Regards Alan
18. Re: Don: Compare Directories and Files
- Posted by Alan Oxley <fizzpop at axxe?s.co.za> Jul 10, 2007
- 671 views
I've sent the whole file to Don, but for the others following this thread here is the top of my result file for comparing arwen.ew v030 with v031 In file1 only, line :001100 : global function getChooseColor(integer id) In file2 only, line :001100 : global function getChooseColour(integer id, integer defaultColour, integer flags) In file2 only, line :001131 : poke4( lpCC + CC_rgbResult, defaultColour) In file1 only, line :001131 : -- poke4( lpCC + CC_rgbResult, size) -- ?defaultColor In file2 only, line :001132 : poke4( lpCC + CC_Flags, flags) -- CC_RFS=CC_RGBINIT+CC_FULLOPEN+CC_SOLIDCOLOR In file1 only, line :001132 : poke4( lpCC + CC_Flags, 0) -- ?CC_RGBINIT In file1 only, line :001139 : return -1 --?defaultColor In file2 only, line :001139 : return defaultColour Where file1 is arwen v030 and file2 is v031 Regards Alan
19. Re: Don: Compare Directories and Files
- Posted by don cole <doncole at pac?ell.net> Jul 10, 2007
- 675 views
- Last edited Jul 11, 2007
Alan Oxley wrote: > > I've sent the whole file to Don, but for the others following this thread > here is the top of my result file for comparing arwen.ew v030 with v031 > > In file1 only, line :001100 : global function getChooseColor(integer id) > In file2 only, line :001100 : global function getChooseColour(integer id, > integer defaultColour, integer flags) > In file2 only, line :001131 : poke4( lpCC + CC_rgbResult, defaultColour) > In file1 only, line :001131 : -- poke4( lpCC + CC_rgbResult, size) -- > ?defaultColor > In file2 only, line :001132 : poke4( lpCC + CC_Flags, flags) -- > CC_RFS=CC_RGBINIT+CC_FULLOPEN+CC_SOLIDCOLOR > In file1 only, line :001132 : poke4( lpCC + CC_Flags, 0) -- ?CC_RGBINIT > In file1 only, line :001139 : return -1 --?defaultColor > In file2 only, line :001139 : return defaultColour > > Where file1 is arwen v030 and file2 is v031 > > Regards > Alan To Alan, I DID NOT receive any files from you, at lease not by email. To Al, I DID recieve your file in my email and will be looking into it. To Pete, I downloaded the lastest version of Edita and the Colored Tabs seem to work fine. I like your idea of making a ListView. I was tring to hard code to colors into my source. Thank you Pete. To everybody, Although Pete has solved my problem with color tabs and Edita, I still want to continue my windows compare project. Thanks everyone for your help. Don Cole
20. Re: Don: Compare Directories and Files
- Posted by Alan Oxley <fizzpop at axxess.?o.za> Jul 11, 2007
- 636 views
Hi Don, I have mailed you twice from my address fizzpop at access dot co dot za, and once from alan dot oxley at alindigo dot com. To doncole at pacbel dot net. Nothing has bounced back. Please mail me at either of these, and I'll use your reply address. Regards Alan