• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

comparing two directories

 
seb petterson
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I would like to find a task that does this:

Has two properties, compare-directory and to-directory. Compares the two directories recursively and outputs the difference to a file.
The output of the compare operation should depend on boolean parameters, such as: "show files that are only in the compare location", "show files that are only in the to location", "show files that are different in both locations".

Example:
I want to use this to compare an older fileset (directory B) of a project with a newer subset of files (directory A) that is to be merged with the older.
I want to find out about all files that exists in directory A and not in directory B. I do not want info about files that exists in directory B and not in directory A. Lastly I want info about files that exists in both places but differ.

Does such a task exist? If not, are there tasks that would facilitate creating a task that does this for me?

Thanks.

Seb
[ August 02, 2006: Message edited by: seb petterson ]
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Linux version of the "diff" utility does something like this.
 
seb petterson
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Tim Holloway:
The Linux version of the "diff" utility does something like this.


Thanks, but I am looking to have this as an ANT task so I can incorporate it in an existing script. The only common denominator that I can assume between me and the other people using the script is that they can run ANT with custom tasks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic