@echo off set srcs=(model_server) for %%s in %srcs% do ( echo: echo Updating %%s ... if not exist %userprofile%\%%s ( echo ERROR! echo Could not find file %userprofile%\%%s ) else ( cd %userprofile%\%%s call git checkout master call git pull origin ) ) echo: pause