I want to write a Python script to do following:
1. launch cmd window
2. execute dos command within cmd window.
I tried following:
command = r'start "test" cmd'
os.system(comma nd)
=> it is able to launch a cmd window with "test" title.
What is the syntax for not only launch the cmd window, but also able to execute a command, like run a python script.
I tried to do
command = r 'start "test" cmd ("dir")'
- expect it launch the cmd window, and excute "dir" command, doesn't work.
1. launch cmd window
2. execute dos command within cmd window.
I tried following:
command = r'start "test" cmd'
os.system(comma nd)
=> it is able to launch a cmd window with "test" title.
What is the syntax for not only launch the cmd window, but also able to execute a command, like run a python script.
I tried to do
command = r 'start "test" cmd ("dir")'
- expect it launch the cmd window, and excute "dir" command, doesn't work.
Comment