/Delete-N-directories-that-match-a-regexp-tp22727856p28525585.html
Sent from the Ant - Users mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h
Matt Benson wrote:
>
> It may be as simple as using / instead of file.separator. Give it a try!
>
Yes, this works.
Thank you,
Daniel
--
View this message in context:
http://www.nabble.com/Delete-N-directories-that-match-a-regexp-tp22727856p25353970.html
Sent from the Ant - User
On Mon, Sep 7, 2009 at 13:28, Daniel Steinmann wrote:
>
>
> Matt Benson wrote:
>>
>>
>> (given same dirset id=ds)
>>
>>
>>
>> ${includes}
>>
>>
>>
>>
>>
>>
>
> Great tip!
>
> But I have problems with the to= part of the regex pattern on Windows. The
> file.separator on Wi
It may be as simple as using / instead of file.separator. Give it a try!
-Matt
--- On Mon, 9/7/09, Daniel Steinmann wrote:
> From: Daniel Steinmann
> Subject: Re: Delete N directories that match a regexp
> To: user@ant.apache.org
> Date: Monday, September 7, 2009, 6:28 AM
>
&
On Mon, Sep 7, 2009 at 6:28 AM, Daniel Steinmann wrote:
> Matt Benson wrote:
>> (given same dirset id=ds)
>>
>>
>>
>> ${includes}
>>
>>
>>
>>
> But I have problems with the to= part of the regex pattern on Windows. The
> file.separator on Windows is the backslash, which i
h is the escape character
for the regex. Therefore the file will include patterns like 'foo\bar**'
instead of 'foo\bar\**'. And then the delete does not work.
Do you have some more magic to make it work on Windows as well?
Thanks,
Daniel
--
View this message in context:
htt
See http://people.apache.org/~mbenson/sharedfiles/deldirs.xml for a working
example.
-Matt
--- On Fri, 3/27/09, Michael Delaney wrote:
> From: Michael Delaney
> Subject: Re: Delete N directories that match a regexp
> To: "Ant Users List"
> Date: Friday, March 27, 2
u could bypass the includesfile and simply
--oh, except in this case you'd use pathsep="," on your pathconvert.
Whaddya think?
-Matt
--- On Thu, 3/26/09, Michael Delaney wrote:
From: Michael Delaney
Subject: Delete N directories that match a regexp
To: "Ant Users List
Michael Delaney schrieb:
> I'm look for a way, with using ant "out of the box", to find a list of
> directories and sort them via date then deleted the oldest three
> directories.
i would go with antcontrib , see =
http://ant-contrib.sourceforge.net/tasks/tasks/timestampselector.html
ok, it's no
or commas in
their names you could bypass the includesfile and simply
--oh, except in this case you'd use pathsep="," on your pathconvert.
Whaddya think?
-Matt
--- On Thu, 3/26/09, Michael Delaney wrote:
> From: Michael Delaney
> Subject: Delete N directories that matc
I'm look for a way, with using ant "out of the box", to find a list of
directories and sort them via date then deleted the oldest three
directories.
Thus far I've been able to sort the directories, take the last three but
I can't seem to figure out how to delete the actual directory; see
atta
11 matches
Mail list logo