lesser-equity

Magazine
Go Back   Computer Juice > Computer Software > Windows Operating Systems


Register


Reply
 
Thread Tools
  #1  
Old 31st Jan 2008, 09:29
New Member Group
 
Hey

I want to write a really simple batch file and was wondering if anyone could help?

Basically I have written some code, and one of the parameters I want to pass to the code is the current working dirrectory of the batch file.

So, say I have a batch file called run.bat, and its in:-

C:\Documents and Settings\J\My Documents\

I want to pass that dirrectory to my program, like this:-

java Main "C:\Documents and Settings\J\My Documents"

I know if I do cd I get the current working dirrectory, so i guess its something like this:-

Code:
java Main $cd$
any pointers?

thanks
  #2  
Old 1st Feb 2008, 03:42
Donor Group
 
Quote:
Originally Posted by JavaJoe View Post
Hey

I want to write a really simple batch file and was wondering if anyone could help?

Basically I have written some code, and one of the parameters I want to pass to the code is the current working dirrectory of the batch file.

So, say I have a batch file called run.bat, and its in:-

C:\Documents and Settings\J\My Documents\

I want to pass that dirrectory to my program, like this:-

java Main "C:\Documents and Settings\J\My Documents"

I know if I do cd I get the current working dirrectory, so i guess its something like this:-

Code:
java Main $cd$
any pointers?

thanks
Code:
java Main %*
__________________
I think I am a signature, therefore I exist!
I believe a higher being has me as a signature...

Reply

Register
Thread Tools




Arabic Bulgarian Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Finnish French German Greek Hebrew Hungarian Italian Japanese Korean Latvian Lithuanian Norwegian Polish Portuguese Romanian Russian Serbian Slovak Spanish Swedish Thai Turkish Ukrainian

Copyright ©2006 - 2009 Computer Juice.

Powered by vBulletin® Copyright ©2000 - 2009 Jelsoft Enterprises Ltd. SEO by vBSEO ©2009, Crawlability, Inc.