windows - 运行批处理文件时 cmd 中的奇怪输出

标签 windows git batch-file cmd windows-xp

我在批处理文件中有该脚本:

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

并且 git pull 不起作用,因为我无法更改目录。这是结果图像: enter image description here

我不知道 cd 命令之前的奇怪符号是从哪里来的。

有什么想法吗?

最佳答案

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

将文件保存为不带 BOM 的 ANSI 或 utf-8 格式以使其工作。

关于windows - 运行批处理文件时 cmd 中的奇怪输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25423160/

相关文章:

没有远程名称,git 无法第一次 checkout 分支

DOS批处理文件中的Perl脚本返回值

windows - 如何编写看门狗定时器以重新启动 Windows 服务?

windows - 使用 VBS 解压时出错

git - 带有 virtualenv 和 git 分支的 Bash 命令提示符

git - `git log --name-only` 显示合作者

batch-file - 让批处理程序学习

java - 使用 Windows 批处理文件启动 Java 程序

windows - PID在netstat中存在,但在任务管理器中不存在

c# - c# 中正确的队列线程技术?