PC Review


Reply
Thread Tools Rate Thread

batch file, saving in a different folder than exe

 
 
ZenMasta
Guest
Posts: n/a
 
      29th Nov 2007
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.



 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      30th Nov 2007

"ZenMasta" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the command to use in a batch file to open a folder? =?Utf-8?B?TWljcm90b29sIEtldmlu?= Microsoft Windows 2000 9 27th Nov 2006 03:35 PM
how to execute batch file automatically when file is added in folder SANDY Windows XP General 4 5th Nov 2006 07:29 PM
Batch folder creation from CSV or text file Ian Edmont Freeware 3 31st May 2006 10:22 AM
Set folder permission in a batch file? Kevin Brault Microsoft Windows 2000 CMD Promt 3 23rd Feb 2005 04:31 AM
Copying FULL folder with a batch file? Lucien Peter Windows XP Help 0 27th Sep 2004 02:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:19 PM.