Re: Don: Compare Directories and Files
- Posted by Al Getz <Xaxo at a?l.com> Jul 09, 2007
- 609 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."