Strange output in cmd while batch file is running

2019-02-28 12:20发布

问题:

I have that script in batch file:

cd C:\TESTS\front-tests
call git pull
cd C:\TEST\front-tests\AutoApp\bin\debug
start AutoApp.exe

And git pull do not work because I can not change directory. Here is the result image:

I do not know from where do the strange symbols, before cd command, come from.

Any ideas?

回答1:

The batch file is saved as utf-8 BOM prefixed. What you see as the cd prefix is the byte order mark.

Save the file as ANSI or utf-8 without BOM to make it work.