ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knuplesch, Jürgen <Juergen.Knuple...@icongmbh.de>
Subject AW: How to get the simple file name?
Date Tue, 11 Sep 2007 06:00:55 GMT
Hello,

My expirience is, that Ant always gives you the full path, without a chance to change it.
If someone shows how (you could write your own Ant-Task), I would be very intersted.

My solution is to write the full filename into a textfile and then delete the path with the
replace task.
Probably you need this to write a scriptfile or sth else.

 


-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-----Ursprüngliche Nachricht-----
Von: Hans Schwaebli [mailto:hans_schwaebli@yahoo.com] 
Gesendet: Dienstag, 14. August 2007 12:12
An: user@ant.apache.org
Betreff: How to get the simple file name?

There is a task called <dirname>
   
  I would need a task which gives me just the filename. Any idea?
   
  Example:
  U:\projects\HSW_TST\src\com\haefele\hsw2\tst\abstractions\numbers\EntityForNumbers.java
   
  Now I need to extract the filename "EntityForNumbers.java".
   
  Of course these filenames are dynamical, so it should work for any full path to a file.

       
---------------------------------
Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message