Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: writing multiline .txt  (Read 7246 times)

0 Members and 1 Guest are viewing this topic.

Fantini

  • Guest
Re: writing multiline .txt
« Reply #15 on: August 24, 2007, 05:03:44 PM »
no,i'm not crazy, i'm just a noob

ghostdog74



    Specialist

    Thanked: 27
    Re: writing multiline .txt
    « Reply #16 on: August 24, 2007, 07:34:31 PM »
    I have this .bat:

    ...
    and I want to make it look like this:

    Code: [Select]
    ECHO off
    title TarreWoW Launcher V0.1 by Fantini
    cls
    :start
    ECHO.
    ECHO 1. TarreWoW
    ECHO 2. Servidor numero 2: %opcion%
    ECHO 3. Salir
    set /p choice=Elige el Servidor Porfavor:
    if not '%choice%'=='' set choice=%choice:~0,1%
    if '%choice%'=='1' goto tarrewow
    if '%choice%'=='2' goto servidor 2
    if '%choice%'=='3' goto end
    ECHO "%choice%" No es una opcion valida, intentalo denuevo porfavor
    ECHO.
    pause
    cls
    goto start
    :tarrewow
    ECHO SET realmlist tarrewow.getmyip.com > realmlist.*censored*
    goto end
    :servidor 2
    ECHO SET realmlist %opcion% > realmlist.*censored*
    goto end
    :end
    cls
    ECHO.
    ECHO TarreWoW Launcher V0.1 by Fantini
    ECHO Gracias por preferirnos...
    ECHO.
    pause

    but when I edit my TarreWoW.bat I see '' instead of '%choice%'

    Open notepad or any editor you like, key in the code above save it as some name you like, and you are ready to go.

    NDog

    • Guest
    Re: writing multiline .txt
    « Reply #17 on: August 26, 2007, 05:32:28 AM »
    you can go like this echo %%hello%%>file.txt
    or
    echo if '%%choice%%'=='3' goto terrewow >>tarrewow.bat

    ray.tomar

    • Guest
    Re: writing multiline .txt
    « Reply #18 on: August 28, 2007, 03:58:38 PM »
    Hi Fantini!

                 I request you to please try to use the COPY CON filename.txt command for storing text in multilines.

    For e.g. C:\>COPY CON filename.txt
    write some text here with multilines. When writing of files is over press CTRL+Z button to save the contents of file.

    You may also press F6 button instead of CTRL+Z.