You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Paul Wallace <pa...@isell.com.au> on 2004/08/05 03:03:25 UTC

delete dir with wilcard

Hi,
         Having read the fine manual (fully?), I am still at a loss for
a solution to my problem. I want to delete a directory (and all its
contents (files/sub dirs etc)), but I do not know the name of it, all I
do know, is the path to its parent directory, and the begining of the
directory name - hence the wilcard query. My directory will always be
called jar....something. How can I remove it using Ant, with a wildcard
(or by any means). E.g:
 
c:\mydir\jar-1.7.0\myFile.jar
 
how can I do something like: 
 
delete c:\mydir\jar* 
 
in an Ant expression please? 
 
thanks alot
 
Paul.

RE: delete dir with wilcard

Posted by Koji Sekiguchi <ko...@bluemartini.com>.
Hi,

> delete c:\mydir\jar* 

How about c:/mydir/jar*/ ?

Koji


> -----Original Message-----
> From: Paul Wallace [mailto:paulw@isell.com.au]
> Sent: Thursday, August 05, 2004 10:03 AM
> To: Ant Users List
> Subject: delete dir with wilcard
> 
> 
> Hi,
>          Having read the fine manual (fully?), I am still at a loss for
> a solution to my problem. I want to delete a directory (and all its
> contents (files/sub dirs etc)), but I do not know the name of it, all I
> do know, is the path to its parent directory, and the begining of the
> directory name - hence the wilcard query. My directory will always be
> called jar....something. How can I remove it using Ant, with a wildcard
> (or by any means). E.g:
>  
> c:\mydir\jar-1.7.0\myFile.jar
>  
> how can I do something like: 
>  
> delete c:\mydir\jar* 
>  
> in an Ant expression please? 
>  
> thanks alot
>  
> Paul.
> 

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