You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Kasparek, Bernadette" <be...@IZB-SOFT.de> on 2006/01/20 14:31:10 UTC

How to exclude files with same pattern except one

Hi everybody,

I've the following problem:
I've got a list of some hundred files with pattern "index_xxx*".
Now I want to pack only the files with pattern "index_999*" (about 6
instances) all others should be excluded.

I tried the following:
<tar desfile="test.tar"
	basedir="dist"
	includes="index_99999950*"
	excludes="index_*"
/>

The problem is that in the basedir are additional files with other pattern
which shall also be packed.

Thanks for your help,

Bernadette


RE: How to exclude files with same pattern except one

Posted by Stephen McConnell <mc...@dpml.net>.
 

> -----Original Message-----
> From: Kasparek, Bernadette [mailto:bernadette.kasparek@IZB-SOFT.de] 
> Sent: Saturday, 21 January 2006 12:01 AM
> To: 'user@ant.apache.org'
> Subject: How to exclude files with same pattern except one
> 
> Hi everybody,
> 
> I've the following problem:
> I've got a list of some hundred files with pattern "index_xxx*".
> Now I want to pack only the files with pattern "index_999*" (about 6
> instances) all others should be excluded.
> 
> I tried the following:
> <tar desfile="test.tar"
> 	basedir="dist"
> 	includes="index_99999950*"
> 	excludes="index_*"
> />

Havn't tried this but what happends if you just do:

 <tar desfile="test.tar"
 	basedir="dist"
 	includes="index_99999950*" />

/Steve.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org