Hot Downloads

Welcome, Guest
Username: Password: Remember me

TOPIC: Coloured text in XP command window

Coloured text in XP command window 10 years 5 months ago #15460

  • TheBishop
  • TheBishop's Avatar
  • Offline
  • Moderator
  • Posts: 1719
  • Thank you received: 8
  • Karma: 5
Here's one for all you old timers!
Back in the days of real DOS you could use ANSI escape sequences to format command line text in different colours etc.
Does anyone know of a way to obtain coloured text in a command shell window under XP? Specifically I have a long perl script that checks the network health and it would be nice to have 'OK' come up in green but 'FAIL...' in red.
Any suggestions?
The administrator has disabled public write access.

Re: Coloured text in XP command window 10 years 5 months ago #15461

  • DaLight
  • DaLight's Avatar
  • Offline
  • Honored Member
  • Posts: 1302
  • Karma: 1
It appears that cmd.exe (the command prompt under W2K/XP) does not support ANSI escape sequences as you've deduced. You can however get round this by using COMMAND.COM instead of cmd.exe. Check out this link.
The administrator has disabled public write access.

command.com 10 years 5 months ago #15462

  • TheBishop
  • TheBishop's Avatar
  • Offline
  • Moderator
  • Posts: 1719
  • Thank you received: 8
  • Karma: 5
Thanks for that.
I'll have to do some testing to see whether all the stuff in my script will still work in a 16-bit legacy environment...
The administrator has disabled public write access.
Time to create page: 0.074 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup