Hi, Do any one of you know a freeware written in java,or a sample code, or package that needs to be used,to compare two folders on the same machine and list the files that are different and that are same.
This is relatively easy and entertaining to write for yourself. Have you worked with the File object APIs? If you create a File with the name of a directory you can ask it for a list of files in the directory. When one of those turns out to be another directory use recursion to drill into that one, too. Give a holler if that sounds complicated.
You could put the names of the files you find into an ordered List or Set. With two ordered lists you can use this (ancient) logic:
I did this in Pascal many years ago with 14 options of what to do with files.
I still use it to synchronize directories.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Forgot to address freeware ... if you really just want somehting to use in a hurry, WinDiff is not bad - google for downloads. I use something called SynchronizeIt! and CompareIt! that work, but the UI is a bit funny. And I really ought to register it. Both of these let you compare file contents, which I didn't even mention above. Cheers! [ March 28, 2005: Message edited by: Stan James ]
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I have a simple text file compare routine if you want to write your own, but something like WinDiff is a lot smarter. CompareIt lets you move lines back and forth between the two files you're comparing for a nice manual merge. I don't know anything that would attempt to compare binaries like Word docs.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Hi Thanks again... I dont need a windows tool I am trying use this... to find if the file has changed http://www.bmsi.com/java/#diff
Progress is this.... There is a thread that generates htmls ... if(newly generated file exits in production) { if(is this file changed) move to production else dont move as it has not changed
} else { move it to production }
//Move all the changed files
Don't listen to Steve. Just read this tiny ad:
a bit of art, as a gift, that will fit in a stocking