Strange output in cmd while batch file is running

2019-02-28 11:59发布

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: enter image description here

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

Any ideas?

1条回答
欢心
2楼-- · 2019-02-28 12:23

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.

查看更多
登录 后发表回答