Command prompt redirect to Arduino not working

I have a simple Arduino program that parses an int from the serial input and opens a solenoid. It works perfectly with the Arduino Serial Monitor, PuTTY, and HyperTerminal. (Older arduino, diecimila with atmega168)

The goal I have is to send that data to the Arduino from the command prompt. I have already made sure the command prompt com settings are correct by running:

mode com7:9600,n,8,1

However, when I try to send it the integer for it to parse, nothing happens, for example:

ECHO 2 > COM7

I have also tried ECHO '2' > COM7, ECHO "2" > COM7, (ECHO 2) > COM7 and all the other variations I could think of.

Here is my simple sketch:

int incoming;

void setup()
{
  Serial.begin(9600);
  pinMode(2, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(8, OUTPUT);
}

void loop()
{
  if (Serial.available() > 0)
  {
    incoming = Serial.read();

    switch(incoming)
    {
      case '1':
      digitalWrite(2, HIGH);
      delay(2000);
      degitalWrite(2, LOW);
      break;
      case '2':
      digitalWrite(4, HIGH);
      delay(2000);
      degitalWrite(4, LOW);
      break;
      case '3':
      digitalWrite(6, HIGH);
      delay(2000);
      degitalWrite(6, LOW);
      break;
      case '4':
      digitalWrite(8, HIGH);
      delay(2000);
      degitalWrite(8, LOW);
      break;
    }
  }
}

I have tried this sketch with and without the single quotes around the case numbers, I have also tried using the Serial.parseInt() function instead of Serial.read(). Still, in all cases, it works with the above 3 programs but not with the command prompt. I have also tried this on Windows XP and Windows 7 with the same results.

Any help is greatly appreciated!

Thanks in advance,

Legomaniac

Well, I had no idea what to do, answers I got from Stack Overflow didn't help, and I had a spare Arduino UNO on hand. I plugged the UNO into my relay board, uploaded the identical code, and now everything works from the command prompt AND the three above mentioned programs.

Would anyone have any idea why this would behave differently with the same code on an UNO compared to a Diecimila?

I was under the impression that the code should behave the same independent of the type of Arduino. Regardless, I will be using the UNO from here on out, as I need to communicate with it over the command prompt.