windows - Nested batch for loops -
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\testsuite %%d in (%testdirs%) ( set ctd=%td%\%%d echo ctd: !ctd! rem echos expected path echo ctd: %ctd% rem echos nothing -- understandable /r !ctd! %%f in (*.fs) (echo %%f) rem echos nothing -- why? /r src\test\resources\testsuite\fast %%f in (*.fs) (echo %%f) rem echos expected files )
i tried various solutions involving disabling delayedexpansion, call-statements , whatnot, never got inner loop working. know replace inner loop subroutine call, there gotta way make work nested loops.
what if used pushd !ctd!
, popd
, , let for /r
default using current directory?
Comments
Post a Comment