Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Batch file - echo statement without double quotes

Tags:

batch-file

So, I don't get it about this part:

echo " _________________________________________________________________ "
echo "|                                                                 |"
echo "| The wall in front of you moved upwards and light shined so      |"
echo "|                                                                 |"
echo "| bright, but you could move. You walked towards the light. And   |"
echo "|                                                                 |"
echo "| from here, your adventure will start soon. We welcome you to    |"
echo "|                                                                 |"
echo "| Votre Monde, Franqais...                                        |"
echo "|_________________________________________________________________|"

So... here's the problem. If I try to remove the double quotes ("), the whole batch file crashes. I need it to be remove because it ruins the design of a game. Is there a way to let an echo allowed the code above without double quotes? I'd be very glad. Thank you...

like image 544
The_Gamer Avatar asked Jan 17 '26 05:01

The_Gamer


1 Answers

You need to escape this special character | by adding a caret ^|

and your code can be written like this one :

@echo off
echo  __________________________________________________________________ 
echo ^|                                                                 ^|
echo ^| The wall in front of you moved upwards and light shined so      ^|
echo ^|                                                                 ^|
echo ^| bright, but you could move. You walked towards the light. And   ^|
echo ^|                                                                 ^|
echo ^| from here, your adventure will start soon. We welcome you to    ^|
echo ^|                                                                 ^|
echo ^| Votre Monde, Franqais...                                        ^|
echo ^|_________________________________________________________________^|
pause>nul
like image 102
Hackoo Avatar answered Jan 19 '26 18:01

Hackoo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!