0
Hello everybody all right? I’m trying to create a bat file to run python scripts in different directories, something like that:
C:\Test
| --- Test1\example.py
| --- Test2\example.py
| --- Test3\example.py
| --run.bat
I have several folders within Test, 'Test1', 'Test2' and 'Test3', I need to run them simultaneously with different command prompts, I got something like this:
@echo off
set back=%cd%
for /d %%i in (C:\Test\*) do (
start
cd "%%i"
python example.py
pause
cd %back%
)
But it runs only one script and goes back to the initial directory, so I noticed, I believe it is running for only in the first directory, some hint for this problem?
Thank you!