简体   繁体   中英

Batch does not recognize echo

Well I got this errormessage when I load my bacth and I can't figure out what I'm doing wrong.

 C:\\Windows\\system32>´╗┐@echo off ´╗┐@echo gjenkjennes ikke som en intern eller ekstern kommando, kjørbart program eller satsvis fil. 

It says "command not recognize"

And here is a sample of my code

@echo off
PING www.vg.no>nul
if errorlevel 1 goto nonet
if errorlevel 0 goto gotnet
goto END
:nonet
echo == Maskinen er ikke tilkoblet wlan.Dette programet krever nett og vil derfor avsluttes. 
timeout 5>null
exit

:gotnet
echo == Maskinen er tilkoblet nett. 
:END
PING ping 192.168.1.241>nul

if errorlevel 0 goto gotlocal
if errorlevel 1 goto nolocal

:nolocal
echo == Skript finner ikke server. Program avsluttes.
timeout 5>nul
Exit


:gotlocal
@echo [WLAN CHECK][:)                      ]
@timeout 1 >nul
cls
@echo [WLAN CHECK][::)                     ]`

It seems that you saved yor batch file with a UTF8 BOM (EF BB BF).
Open it with a text editor and save it as ANSI-Text file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM