Go Back   Computer Juice > Computer Software > Windows Operating Systems
Register Points Site Spy New Posts Donate Unanswered Posts Search Forum Rules


Reply
 
LinkBack Thread Tools
  #1  
Old 31st Jan 2008, 08:29 AM
No Avatar
JavaJoe  American Samoa
New Member Group
 
JavaJoe is offline
 
Join Date: 31st Jan 2008
Last Online: 3rd Feb 2008 06:22 AM
Posts: 2
iTrader: (0)
JavaJoe is on a distinguished road
Default simple batch file?

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
Digg this postDel.icio.us this postReddit this post Stumble this postFacebook this post
Reply With Quote
  #2  
Old 1st Feb 2008, 02:42 AM
Mike0001's Avatar
Donor Group
Intel Nvidia
Mike0001 is offline
 
Join Date: 30th Aug 2007
Last Online: 26th Nov 2008 03:20 AM
Posts: 1,168
iTrader: (0)
Mike0001 will become famous soon enoughMike0001 will become famous soon enoughMike0001 will become famous soon enough
Default simple batch file?

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...

Digg this postDel.icio.us this postReddit this post Stumble this postFacebook this post
Reply With Quote

Please support this forum, donate towards our running costs.
Reply

Thread Tools
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple guide: Speed up your computer! slipend General Software Chat 2 6th Aug 2007 05:09 AM
A simple question... crimson123 Networking, Modems & VoIP 7 27th Apr 2007 11:30 AM
Is there a simple way to figure out... Barbiq Off Topic Discussion 2 1st Apr 2007 06:02 AM
How do I take a simple yet brilliant idea (a... baby snooks Off Topic Discussion 5 21st Mar 2007 05:25 AM
"A handheld computer systems uses a batch sysytem"... Janedihno Laptops, Mobiles & PDAs 1 20th Mar 2007 02:05 PM


Copyright ©2006 - 2008 Computer Juice.

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