If you have only two scripts, you had the right idea, just got your syntax wrong:
start cmd.exe /k "python script1.py & start cmd.exe /k python script2.py"
If you need window titles:
start "Window1" cmd.exe /K "python script1.py & start "window2" cmd.exe /K python script2.py"
Any more than two scripts, and you will have to resort to trickier stuff. The following .cmd file will do the trick:
@echo off
if "%~1" == "recurse" goto runScript%~2
start "Window1" cmd /k "%~f0 recurse 1"
exit /b 0
:runScript1
python script1.py
start "Window2" cmd /k "%~f0 recurse 2"
exit /b 0
:runScript2
python script2.py
start "Window3" cmd /k "%~f0 recurse 3"
exit /b 0
:runScript3
python script3.py
exit /b 0
And this is scalable to any number of scripts or commands, with arbitrary parameters to the scripts, etc. If you want the cmd windows to just pause, and disappear when you press a key:
@echo off
if "%~1" == "recurse" goto runScript%~2
start "Window1" cmd /c "%~f0 recurse 1"
exit /b 0
:runScript1
python script1.py
start "Window2" cmd /c "%~f0 recurse 2"
pause
exit /b 0
:runScript2
python script2.py
start "Window3" cmd /c "%~f0 recurse 3"
pause
exit /b 0
:runScript3
python script3.py
pause
exit /b 0
If you want them all to terminate instantly at the press of one key on the final window:
@echo off
if "%~1" == "recurse" goto runScript%~2
start "Window1" cmd /c "%~f0 recurse 1"
exit /b 0
:runScript1
python script1.py
start "Window2" /wait cmd /c "%~f0 recurse 2"
exit /b 0
:runScript2
python script2.py
start "Window3" /wait cmd /c "%~f0 recurse 3"
exit /b 0
:runScript3
python script3.py
pause
exit /b 0
So, you have lots of options for behaviour of the script.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…