When you want to save a file in NOTEPAD with a extension other than .TXT, you select All Files and type FileName.BAT but it saves it as FileName.BAT.TXT.

You can force NOTEPAD to behave by enclosing the name in quotes; i.e. "FileName.BAT".