This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Path Convert  tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Path Convert  tag" Watch "Path Convert  tag" New topic

Path Convert tag

Muhammad Ahsan

Joined: Feb 21, 2005
Posts: 5
I am writing ant scripts which configure certain batch files.
I am using websphere ant (the version of ant which comes with websphere)

Most of my ant scripts take parameters ( mostly classpath) from the
properties file (

How can edit the classpath in a batch file/text file from ant?

I read Path Convert tag do that. I dont know how to implement it?

please give an working exmaple.

Saad Ahsan
Carol Enderlin
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Is your classpath in your properties file complete or do you need to modify it? Or build it in the build file?

I'm not really sure what you need to accomplish, but you wanted an example using path convert tag. I used it with a copy task to take a path that was specified and "build-converted" in the build.xml (maybe you are wanting to just get it from the properties file?) and put it into a .bat file.

Your mileage may vary, I was using 1.6.2. I used the example code for Copy and PathConvert from Ant Manual.

my build-convert.xml

Original .bat file:

modified .bat file
Consider Paul's rocket mass heater.
subject: Path Convert tag
Similar Threads
Ant: Constructing path string from fileset?
How to run JUNIT Tester with Ant
Getting ImportError: No module named pythoncom error
how to use ejbdeploy.bat of RAD