Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Direcotry Delete based on pattern

Direcotry Delete based on pattern

2003-03-17       - By Chris Reeves
Reply:     1     2     3     4     5     6     7     8  



> -----Original Message-----
> From: Dominique Devienne [mailto:DDevienne@(protected)]
> Sent: Monday, March 17, 2003 5:27 PM
> To: 'Ant Users List'
> Subject: RE: Direcotry Delete based on pattern
>
>
> That's my point: There isn't!!!

Noted.

> You don't need to write a
> task, but a little task that implements
> org.apache.tools.ant.types.selectors.FileSelector, and then
> use it inside the <fileset>.

Yup - I could do that. But, I was looking for a quick-and-dirty
solution.

>
> See
> http://ant.apache.org/manual/CoreTypes/selectors.html#customse
> lect for how to plug in your custom selector. --DD

Thanks - I hadn't looked at the selectors before. As it stands, in the
time I spent researching it, the person on my team that asked for it has
decided he no longer needs it. I'm off the selector hook.

Chris

> -----Original Message-----
> From: Chris Reeves [mailto:CReeves@(protected)]
> Sent: Monday, March 17, 2003 4:24 PM
> To: Ant Users List
> Subject: RE: Direcotry Delete based on pattern
>
> If by implement, you mean write my own task, that isn't
> really an option here. I just need a fileset option that
> takes a regex.
>
> Chris
>
> > -----Original Message-----
> > From: Dominique Devienne [mailto:DDevienne@(protected)]
> > Sent: Monday, March 17, 2003 5:03 PM
> > To: 'Ant Users List'
> > Subject: RE: Direcotry Delete based on pattern
> >
> >
> > Implement your own custom selector to select the 'numeric'
> > files within the fileset. --DD
> >
> > -----Original Message-----
> > From: Chris Reeves [mailto:CReeves@(protected)]
> > Sent: Monday, March 17, 2003 4:00 PM
> > To: Ant Users List
> > Subject: RE: Direcotry Delete based on pattern
> >
> > Can I use a mapper inside a <delete>? Regexp would work to
> > find the files, I believe.
> >
> > Chris
> >
> > > -----Original Message-----
> > > From: Chaganthi, Madhusudan R. [mailto:mvc9@(protected)]
> > > Sent: Monday, March 17, 2003 4:44 PM
> > > To: 'Ant Users List'
> > > Subject: RE: Direcotry Delete based on pattern
> > >
> > >
> > > I dont know if a task exists as such.
> > >
> > > But maybe you can use a few of the existing tasks combined
> > to do this.
> > >
> > >
> > > PSEUDO-CODE
> > > Can you not get the name of each directory and parse it
> into an int.
> > >
> > > If the parsing goes fine, delete that directory
> > >
> > > If parsing throws a FormatException or something on those lines,
> > > leave that directory alone.
> > >
> > >
> > >
> > > Either way, I would appreciate the solution you turn to.
> > >
> > > Regards
> > >
> > > Madhu
> > >
> > > -----Original Message-----
> > > From: Chris Reeves [mailto:CReeves@(protected)]
> > > Sent: Monday, March 17, 2003 4:37 PM
> > > To: user@(protected)
> > > Subject: Direcotry Delete based on pattern
> > >
> > >
> > > I have a load of directories, all with numeric names
> (e.g. 123, 734,
> > > 231) - hundreds of them.
> > >
> > > I need to delete all these directories, while leaving any
> > > directories with non-numeric names intact.
> > >
> > > I thought I could use a patternset, but that won't do it. Any
> > > suggestions?
> > >
> > > Chris
> > >
> > > ----------------------------------------
> > > Chris Reeves
> > > Senior Software Developer
> > > Medfusion, Inc.
> > > creeves@(protected)
> > > ----------------------------------------
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.