PDA

View Full Version : Batch file modification



vasontsystems
10-27-2008, 08:12 AM
Hello everyone,

I need to find a way to create an action to edit some batch files... the batch files that are installed look something like this...

c:
cd c:\Vasont\dita
ant -f C:\Vasont\dita\Vasont_pdf.xml -Dargs.input=%1 -Dexec.arg.1=%2

What I need to do is replace the "c:' and "c:\vasont\dita" to the default install directory that the installer installed the package to. I didn't have any luck finding a good way to find/replace text or strings in a batch file... Any help would be appreciated... Thanks

- DBA

jassing
10-27-2008, 09:25 AM
Hello everyone,

I need to find a way to create an action to edit some batch files... the batch files that are installed look something like this...

c:
cd c:\Vasont\dita
ant -f C:\Vasont\dita\Vasont_pdf.xml -Dargs.input=%1 -Dexec.arg.1=%2

What I need to do is replace the "c:' and "c:\vasont\dita" to the default install directory that the installer installed the package to. I didn't have any luck finding a good way to find/replace text or strings in a batch file... Any help would be appreciated... Thanks

- DBA

use TextFile.ReadToString(); String.Replace(); TextFile.WriteFromString();

that or just run the code in your batch file in your lua script.