1

Possible Duplicate:
Several ways to call a windows batch file from another one or from prompt. Which one in which case?

The whole process is like this without using batch file:

  1. Change directory to c:\ris.

  2. Start a batch file c:\python26\env\scripts\activate.bat. This then starts some kind of python console, prompt changes to (env) c:\ris.

  3. Here I run command paster serve --reload development.ini.

I have done step 1 and 2 but cannot co step 3. When I run my batch file (mapfishstart.bat) I can open new console of activate.bat but cannot automatically pass the command to activate.bat (I have to type it in and want it to be automatic). I would not prefer any changes to activate.bat file.

Can anyone help to automate 3rd process?

Community
  • 1
  • 1
neogeomat
  • 361
  • 3
  • 13

1 Answers1

0

if I understood your question correctly and you want to automatically run a command within console, then echo paster serve --reload development.ini | c:\python26\env\scripts\activate.bat may work, dependant on whether any commands before the one which starts python console consumes stdin or not.

wmz
  • 3,645
  • 1
  • 14
  • 22