相关疑难解决方法(0)

覆盖 Windows 批处理文件中的行?

就在我说什么之前,我已经尝试过以下代码:

@echo off

setlocal enableextensions enabledelayedexpansion
for /f %%a in ('copy /Z "%~dpf0" nul') do set "ASCII_13=%%a"

set /p "=Example 1" <NUL

set /p "=!ASCII_13!Example 2" <NUL
Run Code Online (Sandbox Code Playgroud)

我的来源:如何覆盖批处理文件的命令输出中的同一行(来自它的验证答案)

这对我不起作用。它只是像Example 1Example 2我尝试时那样输出。

所以我只需要一种方法来覆盖批处理文件中的同一行(例如,它之前说“示例 1”,但在该行之后会说“示例 2”)。

谢谢!

windows batch command-line batch-file cmd.exe

1
推荐指数
2
解决办法
7547
查看次数

标签 统计

batch ×1

batch-file ×1

cmd.exe ×1

command-line ×1

windows ×1