我正在运行以下代码片段
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/