I'm trying to post some batch file script so that I can allow members to see the script I need help with. But, it seems when I do, the HTML application does not maintain the format of the script. It jumbles it all together into one ugly heap. What codes can I use in my post to maintain the format of the script I am trying to post?

For example, here's the jumbled mess:

@echo off title Network Functions ::accessories.bat ::contains a menu of pertinent utilities and applications pause :menu cls echo.
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» echo º Michael Baber Ä Accessories º echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ echo º 1. DOS Edit º echo º 2. Hyper Terminal º echo º 3. Notepad º echo º 4. System Information º echo º 5. System Restore º echo ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĹ echo º 6. Return to Main Menu º echo º 7. Exit º echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ echo. echo. set /p input:"Select number: " if errorlevel ==7 goto Exit if errorlevel ==6 goto Return to Main Menu if errorlevel ==5 goto System Restore if errorlevel ==4 goto System Information if errorlevel ==3 goto Notepad if errorlevel ==2 goto Hyper Terminal if errorlevel ==1 goto DOS Edit

:DOS Edit c:\windows\system32\edit.com pause goto menu

:Hyper Terminal C:\Program Files\Windows NT\hypertrm.exe pause goto menu

:Notepad c:\windows\system32\notepad.exe pause goto menu

:System Information c:\program files\common files\microsoft shared\msinfo.exe pause goto menu

:System Restore c:\windows\System32\restore\rstrui.exe pause goto menu

:Return to Main Menu c:\batch\menu.bat pause goto menu

:Exit exit

link|improve this question

64% accept rate
Which HTML application are you using? Knowing this will change parts of the answer with regard to encoding certain characters or using alternative formatting. – Jason Aller May 1 '11 at 17:04
The Internet lol... The <pre></pre> wrapping worked perfectly. – H3br3wHamm3r81 May 1 '11 at 18:32
feedback

1 Answer

up vote 3 down vote accepted

You can wrap it with <pre></pre> tags which will preserve the original spacing of whatever you want to paste.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.