Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question
    
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
    
On SU, you just need to indent each line 4 spaces. There is a handy button in the editor which does this for you. I've fixed your post by just pressing that button one time. It's really easy. I gave this -1 because this is OT and explained on the page you used to post this message. If you're not talking about SU then you need to specify the encoding schemes you are converting between. –  krowe Dec 26 '14 at 3:08

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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