https://github.com/charlesdh/addfwrs
It uses some batch file tricks that I don't understand to create colorful texts.
But there is some problem with this method when in current directory exist file or directory with same name as color text it tries to create.
File would be deleted and if there is directory it ends with "Access is denied."
This is that part I don't understand:
Code: Select all
@echo off
echo Test
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set "DEL=%%a"
)
call :ColorText 0a "Green"
goto :eof
:ColorText
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1
goto :eof
I have only basic understanding of batch files and can't figure out what those "%~2" or "<nul set ..." things do.