@echo off
:: Original author: WebstersBatch
color 0a
setlocal disableDelayedExpansion
set q=^
echo.
echo.
call :c 0A HELLO
call :c 0b AND
call :c 0c WELCOME
echo.
call :c 0d TO
call :c 0E MY
call :c 0f COLOR
call :c 0a TEST /n
echo.
call :c 0A ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
call :c 0b ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ /n
call :c 0c ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
call :c 0d ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ /n
echo.
call :c 0A SUBSCRIBE
call :c 0b TO
call :c 0c MY
call :c 0d YOUTUBE
call :c 0E AT
call :c 0f YOUTUBE.COM/
call :c 0a WebstersBatch /n
echo.
pause
exit /b
:c
setlocal enableDelayedExpansion
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:colorPrint Color Str [/n]
setlocal
set s=%~2
call :colorPrintVar %1 s %3
exit /b
:colorPrintVar Color StrVar [/n]
if not defined DEL call :initColorPrint
setlocal enableDelayedExpansion
pushd .
':
cd \
set s=!%~2!
:: The single blank line within the following IN() clause is critical - DO NOT REMOVE
for %%n in (^^
^) do (
set s=!s:\=%%~n\%%~n!
set s=!s:/=%%~n/%%~n!
set s=!s::=%%~n:%%~n!
)
echo !s!
pause
cls
for /f delims^=^ eol^= %%s in (!s!) do (
if ! equ setlocal disableDelayedExpansion
if %%s==\ (
findstr /a:%~1 . \' nul
set /p =%DEL%%DEL%%DEL% <nul
) else if %%s==/ (
findstr /a:%~1 . /.\' nul
set /p =%DEL%%DEL%%DEL%%DEL%%DEL% <nul
) else (
(echo %%s\..\') >colorPrint.txt
findstr /a:%~1 /f:colorPrint.txt .
set /p =%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%%DEL% <nul
)
)
if /i %~3==/n echo.
popd
exit /b
:initColorPrint
for /f %%A in ('prompt $H&for %%B in (1) do rem') do set DEL=%%A %%A
set /p =. <nul >%temp%\'
subst ': %temp% >nul
exit /b
:cleanupColorPrint
del %temp%\' 2>nul
%temp%\colorPrint.txt 2>nul
>nul subst ': /d
exit /b