You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Robert Mark Bram <re...@optusnet.com.au> on 2004/11/22 11:01:40 UTC

path/to/dir to path_to_dir

Hi All!

I am receiving a path through the command line as a property in my Ant 
script.

I am using the property as a path, but I also want to use it as a name, 
meaning that I want path/to/dir to appear as path_to_di..

Is there a way to do this?

Any advice would be most welcome!

Rob
:)

-- 
Robert Mark Bram
http://phd.netcomp.monash.edu.au/RobertMarkBram/default.asp
B.Comp.(Systems Development/Business Systems)
B.Net.Comp.(Hons)
Doctor of Philosophy Student

School of Network Computing
Faculty of Information Technology
Monash University
Peninsula Campus
McMahons Rd
Frankston, VIC 3199
AUSTRALIA


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


Re: path/to/dir to path_to_dir

Posted by Christoph Bugel <ch...@tti-telecom.com>.
Robert Mark Bram wrote:
> Hi All!
> 
> I am receiving a path through the command line as a property in my Ant 
> script.
> 
> I am using the property as a path, but I also want to use it as a name, 
> meaning that I want path/to/dir to appear as path_to_di..
> 
> Is there a way to do this?

Look at propertyregex from ant-contrib.
It can create a new property for you from the old one,
doing some regular expression replacements
(such as convert all slashes to underscores)

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