To further @dsolimano's answer, if you are specifically using Visual Studio, and in my case it's 2013, I fixed it by doing the following:
- Open Visual Studio.
- Click Tools > Options.
- Click Text Editor > File Extension.
- In the Extension box, enter bat.
- In the Editor drop down, select Source Code (Text) Editor With Encoding and click Add.
- Click OK to save and exit.
Now, when you open a .bat file from within Visual Studio, you will initially get prompted with:
You will want to drill down through the options until you come to the DOS option of your language:
Click OK to finish opening the file.
Ok, even though it should be fairly obvious at this point, if you can see the
∩╗┐ characters at the beginning of your file, it would behoove you to remove them and save the file, now with the correct encoding. This is what prevents you from being prompted again next time.
With all of that in place, you will be glad to know that you may now view, edit, and save your .bat file(s) from within Visual Studio so that cmd.exe no longer gives you the aforementioned heinous error of:
'∩╗┐' is not recognized as an internal or external command, operable program or batch file.