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:41:17 GMT

Few more clarifications----

to be more clear... i can take one copy of the repeated files under the temp
directory and do a build but need to keep track of the dirs where these
files are repeated.. so that i could copy back my build artifact to the
respective folders.. in the above case.. 

im finding the repeated a.txt under title
found it under t1 and t2..
copy once copy either from t1 or t2 to temp dir
keep track of the folders where and all the a.txt is repeated
do the build in temp dir and copy back the build output to the respective
folder as per our earlier track.. in this case, copy back the build artifact
to t1 and t2.


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