I am trying to have a bat file in folder1 which is the parent folder, and this bat file which named run.bat will loop through all subfolders, and invok
folder1
run.bat
Based upon your extra information in the comments, this should work for you.
@echo off FOR /d /r %%i IN (*) DO ( if exist "%%i\child.bat" start "" /d "%%i" "%comspec%" /c "child.bat" )