# calling a batch or executable application on Windows

How to run a batch file, send commands and collects output on windows

Run["!C:\\runme.bat"]


it outputs 1 and a window appears and then disappears. I also want to send my script file to python shell and collect its output in mathematica. How to do on Windows?

ReadList["!C:\\Python27\\python.exe", "my_script_file.txt"]

-
Have a look at 1894 –  b.gatessucks Oct 22 '13 at 7:35
It outputs 1 because the batch script outputs 1 as its result. This is a number meant to indicate the success of the script's execution. Run is a very simple command. It runs a string as if you had put it into the command prompt. That's really it. –  Searke Oct 23 '13 at 15:17