CMD versus .bat

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Sheik
Posts: 1
Joined: 04 Mar 2018 20:39

CMD versus .bat

#1 Post by Sheik » 05 Mar 2018 04:59

Why does this work in window10 CMD window but not in a batchfile?
taskkill.exe /f /fi "windowtitle eq Skype™‎ - email@server.de"

Thank you for any answer.

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: CMD versus .bat

#2 Post by aGerman » 05 Mar 2018 05:51

I assume your batch file was saved in an encoding that isn't equal to your OEM encoding which is used in a console window. Thus, non-ASCII characters (such as ™) will result in wrong characters. Execute CHCP in a CMD window to see what code page is used. Then use the same encoding in your text editor to save the script.

Steffen

Post Reply