@echo off FOR /f "tokens=*" %%G IN ('dir /b') DO ( if exist %%G\.git ( echo %%G cd %%G git pull --recurse-submodules cd .. echo ==================== ) if exist %%G\.svn ( echo %%G cd %%G svn update cd .. echo ==================== ))