Just out of curiosity: Why don't you want to read line-by-line from the console? Or do you use the same code to read from both file and console? Peter