Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.