Hello everyone, how are you? I'm trying to create a bat file to run python scripts in different directories, something like this:
C:\Test
| --- Test1\example.py
| --- Test2\example.py
| --- Test3\example.py
| --run.bat
I have several folders inside of 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 only runs a script and goes back to the home directory, so I noticed, I believe it is running for only the first directory, any suggestions for this problem?
Thank you!