In software development sometimes we need to compare two folders which are having same files. The same case happened with me. So I have written simple directory compare utility.
This is an executable jar which compares two folders and list down the result in xls file. This is simply written in java and UI is in java swing so it will work in any OS.
Click to Download Directory Comparator
Prerequisites to run the utility:
1) Set the PATH environment variable to Java\jdk1.6.0_24\bin\ to run executable jar.
2) Output is created in .xls format. So .xls editor is needed for reading excel file. Use Microsoft Excel for windows and OpenOffice for Linux.
3)While providing input, First directory should be the latest directory otherwise it will not show the newly added files in result.
To Run the utility follow below steps:
1) Double click on executable jar or use command java -jar DirectoryComparator.jar to run using command line.
2) Input to utility:
1) Two directory paths for comparison.
Note*:First Directory should be the latest directory otherwise it will not show the newly added files in result.
2) Path of result file which is a excel sheet. (no need to give extention to excel file)
3) Comma separated list of file extensions ( if this left empty it will compare all the files.)
e.g. java,jsp,txt,jpeg.css that means it will compare these files only.
Below is screen shot of utility with input selected:
3)After filling all the inputs and hitting compare button.The popup will show the path of excel file and basic result of the comparison as shown in below image.
4) Go to the excel file and expand the columns to see the details. Excel sheet shows the following details.
a)Column List Of Changed Files : path of files which are changed
b)Column Added File List : Shows file which are newly added.
c)Column Other Information Shows :
a)Number of files compared count.
b)Number of files differs count.
c)Number of newly added files count.
Advantages of this Utility:
1) Comparison is fast and generates simple excel sheet.
2) It gives list of newly added files.
3) Main advantage is it has filtering option i.e if you want to compare java and jsp file only then give input as java,jsp in File with extension input field.
Disadvantages of this Utility:
1)If user want to find newly added files in a directory then user have to give that folder as a first input and the other folder as second. This means it will not list newly added files in second directory.
Click Below link to download executable jar:
If you have any problem running utility please let me know.
Comments would be appreciated.
Thanks