ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cvsusr <>
Subject Re: Ant find duplicate files
Date Sat, 07 Nov 2009 19:32:42 GMT

Thanks for ur replies.. i will look in to that .. before that i shall give
you the explanation of the question.

I have dirs like 


and more sub dirs in each t1/ t2 /t3//

but at one level we have one folder named "src" under all t1, t2, t3 folder
and we do have files in it with same name as a.txt with other files


|-------------t2/src ---------------a.txt
|-------------t3/c/a/src/ ---|
                                        | --------c.txt

My real task is to find all the repeated file in the the subdirectories, if
its present, copy them to the temp directory with folder name mappings.
Since a.txt is present in t1 and t2 folder.. i copy them to a temp folder
and hence both are same file, i do a build picking a.txt file from the t1 or
t2 but then copying the build artifact to the t1 and t2 again.. if atall
there are any changes need to be done in a.txt, developers can go to the
temp folder and does the change in one place either t1 or t2 folder under my
temp dir. the i do a build of that and copy back to the respective folders..
in this case t1 and t2..

this is the whole idea.. hope its clear..

to achieve this scenario.. i splitted m tasks and my first part is to find
the duplicate or repeated file list and store it in a temp dir and then go
on to next steps..

can you pls.. let me know a solution for this..


cvsusr wrote:
> Hi
> In my ant build,
> I need to find duplicate files under set of dirs and if found, copy it to
> the temp directory.
> say in my current dir i have chk/src/a.txt and chk/src2/a.txt and
> chk/src2/b.txt
> the task should find a.txt under src and src2 and copy it to chk/test dir
> with folder names
> Can this  be done in any way..
> Thanks 

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message