@echo off set subdirs=bachelor ..\master ..\candidate ..\doctor for %%i in (%subdirs%) do cd %%i & nomake %1 %2 %3 %4 %5 %6 %7 %8 %9