• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

comparing two directories

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Saloon Keeper
Posts: 28392
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic