For me this issue was caused by the file encoding format being wrong.
I used another editor and it was saved as UTF-8-BOM
so the very first line I had was @echo off
but there was a hidden character in the front of it.
So I changed the encoding to plain old ANSI
text, and then the issue went away.