The attached class contains a custom task that will do the trick. The javadoc
explains how to use it.
Gerard
On Wednesday 19 January 2005 16:36, Dick, Brian E. wrote:
> I need to remove the extension from a file name. The basename task
> almost works when specifying the suffix attribute. How
> To: Ant Users List
> Subject: RE: Remove extension from a file name
>
>
> Do you mean you just want the string, or you want to
> rename the file? Either way you can do it with a
> regexpmapper.
>
> HTH,
> Matt
>
> --- "Dick, Brian E." <[EM
I just want the string.
-Original Message-
From: Matt Benson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 19, 2005 2:47 PM
To: Ant Users List
Subject: RE: Remove extension from a file name
Do you mean you just want the string, or you want to
rename the file? Either way you can
M
> To: user@ant.apache.org
> Subject: AW: Remove extension from a file name
>
>
> using regexps
> (.*)\..* --> \1
>
> Jan
>
> > -Ursprüngliche Nachricht-
> > Von: Dick, Brian E. [mailto:[EMAIL PROTECTED]
> > Gesendet am: Mittwoch, 19. J
PROTECTED]
Sent: Wednesday, January 19, 2005 10:43 AM
To: user@ant.apache.org
Subject: AW: Remove extension from a file name
using regexps
(.*)\..* --> \1
Jan
> -Ursprüngliche Nachricht-
> Von: Dick, Brian E. [mailto:[EMAIL PROTECTED]
> Gesendet am: Mittwoch, 19. Januar 200
e Nachricht-
> > Von: Dick, Brian E. [mailto:[EMAIL PROTECTED]
> > Gesendet am: Mittwoch, 19. Januar 2005 16:36
> > An: Ant Users List
> > Betreff: Remove extension from a file name
> >
> > I need to remove the extension from a file name.
> The base
using regexps
(.*)\..* --> \1
Jan
> -Ursprüngliche Nachricht-
> Von: Dick, Brian E. [mailto:[EMAIL PROTECTED]
> Gesendet am: Mittwoch, 19. Januar 2005 16:36
> An: Ant Users List
> Betreff: Remove extension from a file name
>
> I need to remove the extensi
I need to remove the extension from a file name. The basename task
almost works when specifying the suffix attribute. However, I don't know
the value of the suffix.
Does anyone know how I can remove the extension (suffix) from a file
name?
Later,
BEDick
--