ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RADEMAKERS Tanguy <tanguy.rademak...@swift.com>
Subject Re: Basic wildcard question
Date Fri, 19 Dec 2003 22:40:50 GMT
Hey Julien,

If i understand correctly what you want, you can specify:

<copy todir="./root_one/leaf_two/" flatten="true">

and then you will go from:

    root_one
    --leaf_one
        --some_other_directory
            --toto.txt
    --leaf_two

to:

    root_one
    --leaf_one
        --some_other_directory
    --leaf_two
        --toto.txt

Regards,

/t


Julien Martin wrote:

>Thanks for your reply Kajsa,
>What do I need to modify in my build file in order to copy only the file
>(only toto.txt) to the directory leaf_two without the directory structure?
>Julien.
>
>----- Original Message -----
>From: "Anderson, Kajsa" <Kajsa.Anderson@thomson.com>
>To: "'Ant Users List'" <user@ant.apache.org>
>Sent: Friday, December 19, 2003 10:47 PM
>Subject: RE: Basic wildcard question
>
>
>  
>
>>The difference is that "**/*.txt" will match "*.txt" in any subdirectory,
>>    
>>
>no
>  
>
>>matter how many levels down it might be, whereas "*/*.txt" will only look
>>    
>>
>in
>  
>
>>the directorys that are the immediate children of the parent directory.
>>
>>So... in the case you gave, * and ** happen to both find toto.txt.  If
>>    
>>
>your
>  
>
>>structure was:
>>
>>root_one
>>--leaf_one
>>    --some_other_directory
>>        --toto.txt
>>--leaf_two
>>
>>the ** version would still find toto.txt, but the * version would not.
>>
>>HTH
>>
>>Kajsa Anderso
>>
>>-----Original Message-----
>>From: Julien Martin [mailto:julien-martin@wanadoo.fr]
>>Sent: Friday, December 19, 2003 3:38 PM
>>To: user@ant.apache.org
>>Subject: Basic wildcard question
>>
>>
>>Hello,
>>
>>I am trying to understand the ** wildcard when used in include subtask.
>>Here is the line I don't understand :
>><include name="**/*.txt"/>
>>as opposed to
>><include name="*/*.txt"/>
>>What is the difference between those two lines? They seem to display the
>>same behavior.
>>
>>Here is the xml in its entirety.
>>
>><?xml version="1.0"?>
>><project name="monprojet" default="core" basedir=".">
>><target name="core">
>><copy todir="./root_one/leaf_two/">
>> <fileset dir="./root_one/">
>>  <include name="**/*.txt"/>
>> </fileset>
>></copy>
>></target>
>></project>
>>
>>
>>The directory structure is as follows:
>>
>>root_one
>>--leaf_one
>>    --toto.txt
>>--leaf_two
>>
>>Thanks in advance,
>>
>>Julien Martin.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>  
>

Mime
View raw message