在批处理文件运行时,在cmd中奇怪的输出 [英] Strange output in cmd while batch file is running

查看:144
本文介绍了在批处理文件运行时,在cmd中奇怪的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

而git pull不起作用,因为我无法更改目录。这里是结果图片:



我不知道从哪里做的奇怪的符号,在cd命令之前,来自。

任何想法?

解决方案

批处理文件保存为前缀为utf-8的BOM。您看到 cd 前缀是字节顺序标记。



将文件另存为ANSI或utf-8没有物料清单让它工作。


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?

解决方案

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.

这篇关于在批处理文件运行时,在cmd中奇怪的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆