How do you get a batch file to emit text in multiple colors?
I don't know if it still works, but the command-line console *used* to support a bunch of ANSI escape sequences which could do things like setting its color, moving the cursor, and so on. https://secure.wikimedia.org/wikipedia/en/wiki/ANSI_escape_code
Select as Best AnswerUndo Best Answer
Boy, doesn't "escape code" sound ancient?
"Quick, Robin -- to the Bat-file!"
wanna to make a batch file with connect using different credential. i have a folder on the server which i want to show the user , but dont wanna him to see any other stuff on the server just that folder, please help
I've made a short and simple (jokes) batch file to help you:@echo offfor /f "delims=#" %%a in ('"prompt #$H# &for %%b in (1) do rem"') do set "bs=%%a"setlocal enabledelayedexpansioncolor 0atitle Colour Changer:startclsset /p text=Type the text you want to change colours here: set /p colour=Type the colour code here: "%text%.@" set /p "=.%bs%%bs%%bs%%bs%"findstr /p /a:%colour% . "*.@"del %text%.@pause >nulgoto startIt works like a charm, assuming you know the colour command...If you don't, type "color /?" in at your command prompt.
And I made a function on it here.