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
Quote Malte Schwerhoff's Answer
If you don't want to repeat B, you can simply add "if" statement
@echo off
SetLocal
set B=alpha beta gamma
set A=eins zwo
FOR %%b in (%B%) do (
FOR %%a in (%A% %%b) DO (
IF %%b NEQ %%a (
echo %%b -^> %%a
)
)
)
output:
alpha -> eins
alpha -> zwo
beta -> eins
beta -> zwo
gamma -> eins
gamma -> zwo