Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running DOS command from a different directory 1

Status
Not open for further replies.

bonebonde

Technical User
Jan 19, 2004
26
US
Hi,
I wanna run a command colled collector.bat for my WebSphere Application Server.

The command is in the foollowing path C:\Program Files\WebSphere\AppServer\bin

and I want to run it from C:\PortalWorks

What I do is: C:\PortalWorks>C:\Program Files\WebSphere\AppServer\bin\collector.bat

I get a message that 'C:\Program' is not recognized as an internal or external program

Could someone out there please help?

Thanks
 
you cant put a space in dos silly...

use progra~1 instead of program files or something with "s
 
I agree the space issue is a problem, but why not add to your path statement C:\Program Files\WebSphere\AppServer\bin\?

right-click My Computer, Properties, Advanced, and click Environmental Variables at the bottom. Scroll the bottom box and highligh Path, then click the Edit button.

Add to the end of the path: ;C:\Program Files\WebSphere\AppServer\bin\

DOS can then find collector.bat no matter where you are.
 
just make a batch file to run it and start the batch with a cd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top