Monday, February 26, 2018

windows 10 - Single quote marks in a batch file don't make the chosen program to be executed

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:




C:>chcp



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

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...