windows批处理bat中字体颜色设置

@echo off
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
  set "DEL=%%a"
)

:start

:: 代码开始写的地方, 我是一行注释 call :ColorText 0a
"green" echo. call :ColorText 0C "red" echo. call :ColorText 0b "blue" echo. call :ColorText 19 "yellow" echo. call :ColorText 2F "black" echo. call :ColorText 4e "white" echo. :: 代码结束的地方,我是一行注释
pause
>nul goto :eof :ColorText echo off ".=%DEL%" > "%~2" findstr /v /a:%1 /R "^$" "%~2" nul del "%~2" > nul 2>&1 goto :eof

 

你可能感兴趣的:(windows批处理bat中字体颜色设置)