Matt Benson wrote:
I have used basename for filenames without realizing that it also works for directory names.--- Nat Gross <[EMAIL PROTECTED]> wrote:
How do I get just the last element of the current
directory.
Suppose basedir = dira/dirb/dirc. (Or any path for
that matter.)
Whatever is "the current directory"--${user.dir}?
${basedir}?... You can use the basename task to get
the last element of a path.
Thanks.
Changing case is more problematical. I would eitherI need a property to = "Dirc". (1st character uppercased, if possible.)
try ant-contrib's propertyregex (though I'm not good
with changing case in regular expressions either),
write something in Java, or deal with the case as-is. Others might use a script.
Thanks. I need to explore regex, I guess.
For the pros out there it should be 123, but for
me... forget it!
HTH,
Matt
Thanks
-nat
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]