The problem is that my set tap=c:\ca\sf\1st 2nd... etc. isn't working at all. The echo shows nothing, the set isn't putting the path in the variable for some reason. I got all ifs right, is there another problem?
setlocal enabledelayedexpansion if NEWYORK == %region% ( set tap=C:\ny CALL :process %1 %2 %tap% %cl% GOTO :EOF ) if California == %region% ( if '%3'=='sanfrancisco' ( set cl=c:\ca\sf\cl if '%2'=='1st' set tap=c:\ca\sf\1st if '%2'=='2nd' set tap=c:\ca\sf\2nd if '%2'=='3rd' set tap=c:\ca\sf\3rd if '%2'=='4th' set tap=c:\ca\sf\4th if '%2'=='5th' set tap=c:\ca\sf\5th echo %tap%, echo %cl%, pause CALL :process %1 %2 %tap% %cl% GOTO :EOF ) if '%3' == 'LosAngeles' ( set tap=c:\ca\la set cl=c:\ca\la\cl echo %tap%, %cl% pause CALL :process %1 %2 %tap% %cl% GOTO :EOF ) set tap=c:\USA set cl=c:\usa\cl echo %tap%, %cl% pause CALL :process %1 %2 %tap% %cl% GOTO :EOF ) else ( echo faiiiiiiiiiillllllllll pause GOTO :END) endlocal GOTO :EOF
CALL :process %1 %2 %tap% %cl%you needCALL :process %1 %2 !tap! %cl%