The upcase part can be done with <script>. See http://marc.theaimsgroup.com/?l=ant-user&m=104486168926737&w=2
Jan > -----Ursprüngliche Nachricht----- > Von: Nat Gross [mailto:[EMAIL PROTECTED] > Gesendet am: Dienstag, 25. Januar 2005 23:20 > An: Ant Users List > Betreff: Re: Last element of current directory name. > > Matt Benson wrote: > > >--- 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. > > > > > I have used basename for filenames without realizing that it > also works > for directory names. > Thanks. > > >>I need a property to = "Dirc". (1st character > >>uppercased, if possible.) > >> > >> > >> > >Changing case is more problematical. I would either > >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] >