Hi im making a program that will launch a program from a folder. Here's the code:
@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"
)
title Launcher
call :ColorText 0a "Launcher"
echo.
:CMD
set /p cmd=">>> "
if not defined cmd goto CMD
call "%CD%"\bin\%cmd%
echo %cmd%>"%CD%\Commands_Log\%cmd%
goto CMD
:ColorText
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1
goto :eof
I really want to know how to color the user's input. For example my prompt goes like
C:\ > abcd
Now, how do I color only the "abcd" part??
EDIT: I want it to be colored as it is being typed. This was my original question for everyone who didn't understand.