I need to split a string that come from a variable and, according to another variable, print the result, something like the following example set "DIRECTORY=c:\test1;c:\test2"
set "PROG=TEST1"
REM "PROG=TEST2"
for /f "tokens=* delims=;" %%f in ("%DIRECTORY%") do (
if "%PROG%" == "TEST1"
echo ...... c:\test1
) else (
echo ...... c:\test2
)
)