@echo off set subdirs=bachelor ..\master ..\candidate ..\doctor for %%i in (%subdirs%) do cd %%i & nomake %1