Re: Verify01.exw Al
- Posted by don cole <doncole at p?c?ell.net> Jul 21, 2007
- 699 views
Al Getz wrote: > > don cole wrote: > > > > Al Getz wrote: > > > > > > Don, > > > > > > Sorry i didnt understand your question quite right as i read it > > > too fast. I thought you were asking about how to enter two paths > > > that were different. > > > > > > My program was made to compare whole *directories*, not individual > > > files. You enter two paths but the paths are directory names > > > such as: > > > c:\download\files\ > > > > > > At present, you cant point to an individual file unless you use a trick. > > > > > > If you dont feel like updating it to do that, if > > > you really want to compare two files, then one thing > > > you can do is to copy the two files into two temp directories. > > > You can then point to those directories. > > > > > > See, when i made this program i wanted it to be able to dig down > > > into sub directories to compare all the files, given only the > > > root directory names. > > > > > > > > > Al > > > > > > E boa sorte com sua programacao Euphoria! > > > > > > > > > My bumper sticker: "I brake for LED's" > > > > > > > Hello Al, > > > > I got that verify02 working with my program. It compares 2 directories > > and > > reports the files that are different. It does not however tell you which > > line > > numbers in the files are different. I think that's what you just said. I > > read > > too fast sometimes also. I could send you what I have but I should email it. > > It has several includes. > > > > > > Don Cole > > Hi Don, > > > Im glad you had some luck with it finally. > > The report does not include any files line numbers because it does > a binary compare, not a 'text' or 'line by line' compare. I had > it do a binary compare because many of the files are not text files > (or euphoria source files) but are instead .exe files, .dll files, > etc., with some text files too. > I guess what you would want to see is the compare action taken > commensurate with the type of file? I guess that's not a bad idea > really. We'd have to also supply a list of file extensions and > how those files should be handled, but i guess that's not too much > work to do. On the other hand, the program would then also have to > work with different formats, like .doc and .rtf and be able to > handle unicode. Im not sure if i want to get into that myself > even though it could be done. > Maybe you want to be able to compare Euphoria source files too? > > For now though it looks like it will compare in binary mode only, > however it would not take much to get it to report exactly which > byte was different, and then you could go back and open the files > and provide a dump of part of the two files. Even so, only the > first difference found would be reported as (at least currently) > the algo exits at the first difference found just after writing > to the report file. > > Another thing i should mention (and this is written in the file > itself in a comment section) is that for two directories, call > them A and B (and the variable names reflect this convention with > their last letter being A and B respectively), the file names > (and directory names) not found in B are reported (B is the backup) > but the file names and dir names in B (if there are any) that are > not in A are *not* reported. This is because if for some reason > you feel like including an extra file in the backup for some reason > and you dont really need it on the hard drive, you dont have to > skip reading it in the report file. If this is a problem however, > it doesnt take much to have the 'missing' A files (and dir names) > reported in the report too. > > BackupList.txt: > The other convention used is that file names end with no backslash, > while directory names *always* end with a backslash. This is so > another program can go through the list in the BackupList.txt file > and detect when it has to write an entire directory to disk rather > than a single file. Writing an entire directory means writing > the root files and every sub directory and all those files too, > whereas writing a single missing file is a simple 'copy file'. > > > Al > > E boa sorte com sua programacao Euphoria! > > > My bumper sticker: "I brake for LED's" > Thanks Al, Don Cole