When I try to get the output of a command in a batch file by using single quotes I am getting the following info:
C:>for /f "tokens=2 delims=:." %a in ('chcp') do (echo %a)
'chcp' is not recognized as an internal or external command, operable program or batch file.
This command can be run from the same location directly:
Active code page: 437
I have already checked env variables and they seem to be set correctly. Above problem occurs also when I use 'dir' instead of 'chcp'.
Any ideas what can be the reason and how to fix that?
OS: WIN 10