I am attempting to make a colored command prompt in Windows 7.
Using ansicon, I have successfully managed to create the prompt. However, when I put the commands into a batch file, I receive an error.
These are the commands that I am using:
ansicon -p
chcp 65001
prompt $e[1;31m█$e[1;32m█$e[1;34m█$e[1;33m$_$d $t$_$e[1;37m$p$g
Below is an image that shows the contents and execution of the batch file, and the error that occurs when executing the prompt
command within the batch file. It also shows the manual execution of the commands, and the resulting command prompt.
How can I get the commands to properly execute from a batch file?
-p
What happens when you runansicon -p
on the command line and then run the bat file containing thechcp
andprompt
commands? ANSICON Documentation