The following nested for-loop drives me mad (on Windows 7):
@echo off SetLocal EnableDelayedExpansion set TESTDIRS=fast mid slow set TD=src\\test\\resources
What if you used pushd !CTD! and popd, and let FOR /R default to using the current directory?
pushd !CTD!
popd
FOR /R