Command prompt/.bat files issue

Discussion in 'Windows 7 Help and Support' started by aubycek, Feb 20, 2016.

  1. aubycek

    aubycek New Member

    Joined:
    Feb 20, 2016
    Messages:
    2
    Likes Received:
    0
    Hello. When I create a simple .bat file (to run calculator for example), it will give me an error saying that "filename" is not recognized as an internal or external command. I am 100% sure this happens because there are some symbols before the command "calc". When I right click my .bat file and click on edit, there is just "calc" and nothing else. When I run it, the command prompt run it as "AiLcalc" or something similar to it, so it gives me an error. What to do with this? It happens with every .bat file I try to run.
    -Windows 7 64bit, latest java downloaded
    -Attached screenshot of how it looks like
     

    Attached Files:

  2. Josephur

    Josephur Windows Forum Admin
    Staff Member Premium Supporter

    Joined:
    Aug 3, 2010
    Messages:
    1,019
    Likes Received:
    125
    uhm this is very strange, almost points to memory issues perhaps...

    Have you tried making your batch file in another text editor?
     
  3. aubycek

    aubycek New Member

    Joined:
    Feb 20, 2016
    Messages:
    2
    Likes Received:
    0
    Tried now in Notepad++, same result. What do you mean by memory issues, could you be more specific please? And what could I do about it?
     
  4. Josephur

    Josephur Windows Forum Admin
    Staff Member Premium Supporter

    Joined:
    Aug 3, 2010
    Messages:
    1,019
    Likes Received:
    125
    aubycek,

    Actually I found the issue.. somehow you're saving these documents in UTF-8 format..

    I made a simple document containing "ECHO Testing!" in notepad, when saving it I used the following options (note the Encoding selected):
    SaveAsUTF8.

    When executing it I get the same issue you are stating:

    UTF8EncodingError.

    So the question is, are you intentionally saving in UTF8 format? Did you start with one document that may have already been UTF8 and appended to it? Simply saving it as a normal ANSI encoded document will fix it.
     

Share This Page

Loading...