I just copied and pasted what you put in here to a new .cmd file, it ran with no errors on XP.
Something is reading a character in front of the @ sign. What if you delete that and just use the "if" as the first thing? Does that run.
BTW, you probably want to put the @ in front of the echo command also so it does not pop up when you run the file.