views:

30

answers:

2

This must be a real dumb question. And I cant figure out how.

What I want to do is launch a new command line with some arguments and excute some commands there.

Here is what I have in my .cmd

CMD /k %EnvInstallPath% %wo% %var%

cd /d %wo%\src

When I execute test.cmd, I see that the directory changes to %wo%, but the further cd src is not executed. I need to cd to a directory and execute few other commands. Please help.

A: 

put the other commands in a different bat file and

 start AFewOtherCommands.bat
AShelly
Hi there...Didnt work. My command line ended at the CMD /k %EnvInstallPath% %wo% %var%When I typed exit, the new cmd window popped up.
A: 

When you run cmd with /k the console runs the command and then resumes with the prompt. I'm guessing that what you want is to run the command and resume with the next one, so you need to run cmd with /c instead.

Martinho Fernandes