I have a simple batch file that runs a script to convert a file. However I'm
having trouble figuring out how to put the result file in a folder other
then the java folder
cd C:\Program Files\Java\jre1.6.0_03\bin\
java.exe -jar C:\sax\saxon9.jar c:\sax\source\test.xml
c:\sax\switch-onix-tagnames-2.0.xsl
result-document=testymctesterson.xml
This script places the testymctesterson.xml in the bin folder but I want it
to go in c:\sax\export
I've tried putting a dir before the result-document file name but it doesn't
work. The script runs without error and no output file is created.
Re: batch file, saving in a different folder than exe
"ZenMasta" <me@nospam.com> wrote in message
news:uBSVlFuMIHA.3940@TK2MSFTNGP05.phx.gbl...
>I have a simple batch file that runs a script to convert a file. However
>I'm having trouble figuring out how to put the result file in a folder
>other then the java folder
>
> cd C:\Program Files\Java\jre1.6.0_03\bin\
> java.exe -jar C:\sax\saxon9.jar c:\sax\source\test.xml
> c:\sax\switch-onix-tagnames-2.0.xsl
> result-document=testymctesterson.xml
>
> This script places the testymctesterson.xml in the bin folder but I want
> it to go in c:\sax\export
> I've tried putting a dir before the result-document file name but it
> doesn't work. The script runs without error and no output file is created.
>
>
>
Try running the program from the target directory:
Line1=@echo off
Line2=cd /d c:\sax\export
Line3="C:\Program Files\Java\jre1.6.0_03\bin\java.exe" -jar
C:\sax\saxon9.jar c:\sax\source\test.xml c:\sax\switch-onix-tagnames-2.0.xsl
result-document=testymctesterson.xml
Alternatively you could copy or move to move testymctesterson.xml
to the desired target directory.