batch-file - 批处理中的 msg * 需要换行怎么办?

标签 batch-file msg

我正在运行以下代码片段

Msg * "Hoi %username%, je kunt nu alle vensters sluiten en AutoCAD opniew opstarten"

但我想在 %username% 之后换行,我该如何实现?

编辑:

    ECHO PROOF OF FILE EXECUTION: > "%username%'s proof of file execution.txt"
ECHO.

ECHO EXECUTED BY:   %username%      >> "%username%'s proof of file execution.txt"
ECHO ON:        %date%          >> "%username%'s proof of file execution.txt"
ECHO AT:        %time%          >> "%username%'s proof of file execution.txt"
ECHO .

ECHO PC DETAILS:
ECHO .
ECHO COMPUTER:      %COMPUTERNAME%      >> "%username%'s proof of file execution.txt"

Msg * "Hoi %username% je kunt nu alle vensters sluiten en AutoCAD opniew opstarten" 

最佳答案

问题是,什么是“Msg”,是批处理还是exe文件? 它是否支持<换行>?

你可以试试这个,也许它有效。

setlocal EnableDelayedExpansion
set lf=^


rem Two blank lines (without spaces are neccessary)
Msg * "Hoi %username%!lf! je kunt nu alle vensters sluiten en AutoCAD opniew opstarten" 

但如果有效,则取决于 Msg-Command

关于batch-file - 批处理中的 msg * 需要换行怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4285270/

相关文章:

python - 将参数通过 .bat 文件传递​​给 .exe 文件,由 'PyInstaller' 转换

windows - 嵌套 for 循环,带有嵌套循环窗口批处理中使用的变量

file - 根据文件是否包含字符串进行搜索然后删除

batch-file - 批处理文件中的 ".\"是什么意思?

python - 用python解析outlook .msg文件

jquery - jQuery 中的消息框

Windows 批处理 : How to keep empty lines with loop for/f

c++ - 如何在 Objective-C 或 C++ 中打开 ".msg"(Microsoft Outlook 消息)文件

java - 用 Java 读取 Outlook .msg 文件的最佳库是什么?

c++ - win32主循环间隔问题C++