Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Every time I create .cmd file and execute it windows finds strange symbols at start of file: ie:

REM ping
ping localhost

leads to

C:\>я╗┐REM ping
'я╗┐' is not recognized as an internal or external command,
operable program or batch file.

I've checked encoding of .cmd file and it seems to be fine. Even HEX editor didn't show any strange in file.

share|improve this question
up vote 2 down vote accepted

It looks like a BOM, a Byte Order Mark, although I do not recognize for which encoding. Make sure you save the file with ASCII or ANSI encoding.

If it's not a BOM (because it should normally show up in a hex editor), maybe it's a problem with the Command Prompt. Have you tried using .bat instead of .cmd ?

share|improve this answer
Great! Changing text encoging from UTF-8 to windows-1250 solves the issue! Thank you Snark! – Meta Feb 27 '10 at 13:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .