@echo template to do something to each prog dir. @echo customize before use pause @echo off rem for /a:d /r /h %d in (*.*) do ( if exist %d\version.txt echo %d ) rem for /r /h %u in (*.use) do ( if exist %cd\version.txt copy %u %cd\uses.txt ) rem for /a:d /r /h %d in (*.*) do ( if exist %d\use.txt copy %d\use.txt + C:\temp\end.txt %d\use.txt ) rem /h hide dots so won't process . and .. rem tack -30- onto end of each use.txt for /a:d /r /h %d in (*.*) do ( if exist %d\use.txt copy %d\use.txt+C:\temp\end.txt %d\use.txt )