windows batch file scripting - keep formatting in html

aldernon2

New Member
I'm currently trying to write a simple batch script that will run a series of windows commands and output them nicely into a single html file.the command im running for example, is \[code\]netsh firewall show config\[/code\], Looks something like this:\[code\]Domain profile configuration (current):-------------------------------------------------------------------Operational mode = EnableException mode = EnableMulticast/broadcast response mode = EnableNotification mode = EnableService configuration for Domain profile:Mode Customized Name\[/code\]Notice the nice spacing used that makes it easy to see?I'm trying to keep that in the HTML file that i create. So far, i have a simple batch script as follows:\[code\]@echo offecho ^<font face="courier new" size="2"^>^ >>index.htmlnetsh firewall show config >> netshtype netsh >>index.html\[/code\]When that spools to an index.html file, the resultant output looks something like this:\[code\]Domain profile configuration (current): ----------------------------------------------- -------------------- Operational mode = Enable Exception mode = Enable Multicast/broadcast response mode = Enable Notification mode = Enable Service configuration for Domain profile: Mode Customized Name ------------------------------------------------------------------ Enable No File and Printer Sharing Allowed\programs configuration for Domain profile: Mode Traffic\[/code\]So does anyone know how i can output the command in a nice way, such that the formatting is kept? Its really just a bunch of spaces and breaks.Appreciate your help in advance!
 
Back
Top