Jump to content

Wierd issue with batch file

Go to solution Solved by elpiop,

Try

echo; 

instead of

echo.

 

I am currently writing a batch file, doesn't matter what for, my problem is just that if I want to add a free line between text, for example:

@echo off
echo RandomText
echo.
echo RandomText
pause

 

When I execute it, it shows:

RandomText
The command "echo." is either misspelled or could not be found. (Or whatever the correct english translation of this error might be)
RandomText
press any key to continue.

 

What makes the problem even more wierd for me is the fact that this error only occurs when I start My file as administrator, without admin rights the error doesn't occur.

My script needs admin rights to work properly.

Also I didn't have this problem yesterday, it just suddenly appeard out of nowhere, no changes to the code, nothing. And I can't get it to go away again.

 

Thank you in advance

Dat_Typ

Link to comment
https://linustechtips.com/topic/1126712-wierd-issue-with-batch-file/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×