There is a problem when we used nested setlocal.
We have two batch files
DO_P.btm
dummy.btm
Call DO_P gives:
If we remove the dummy call in DO_P it works
or we remove the setlocal from dummy.btm
or we redefine the alias CL_grep to %@ALIAS[CLPATH:]\grep.exe
How do we solve this issue?
We have two batch files
DO_P.btm
Code:
setlocal
echo OsBuild=%_OSbuildEx
which cl_grep
cl_grep
call dummy.btm
set _key=HKCU\AppEvents\Schemes\Apps\.Default\AppGPFault
do c in /P `regdir /dfv %_key | CL_grep -i ".current[\]"`
echo %c
enddo
endlocal
dummy.btm
Code:
setlocal & echo Dummy Text & endlocal
quit
Call DO_P gives:
Code:
OsBuild=22000.376
CL_grep is an alias : "CLPath:\grep.exe"
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
This Dummy Text
TCC: R:\do_P.btm [10] Unknown command "CLPath:\grep.exe" -i ".current[\]"
If we remove the dummy call in DO_P it works
or we remove the setlocal from dummy.btm
or we redefine the alias CL_grep to %@ALIAS[CLPATH:]\grep.exe
How do we solve this issue?