Thread: Batch
View Single Post
Old 04-20-2007, 03:48 PM   #2 (permalink)
Vormund
 
Monster Techie

Join Date: May 2004

Location: Tucson, AZ, USA

Posts: 1,183

Vormund

Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Lightbulb Re: Batch

Hmm, of course there is...batch files are essentially pre-defined lists of commands...with a few extras.

Since there are spaces in the path/name, just surround it with quotes, eg:

test.bat:
"C:\Program Files\Java\jdk1.6.0_01\bin\javac" %1

using it:
test.bat MyFile.java

That would call the javac executable and use the first command line argument. More then you asked, I know, but...pretty much anything can be enclosed by double quotes, and should be when there's whitespace involved.

Woot off to class.
__________________
Vormund is offline