+1  A: 

Character 10 (0xa) is the Ascii code for linefeed, which many *nix operating systems use for line terminator. It should not be part of the filename. Just strip it off. Also, such operating systems use 0 for a string terminator. It should be at the end of the filename unless the open call takes a number of characters parameter.

The solution is to take the user's reply, find character 10 and replace it with zero. Use the result as the filename to open.

wallyk
Thank youI have solved the problem, by writing and calling the following procedure<pre><code>nameClean: li $t0, 0 #loop counter li $t1, 21 #loop endclean: beq $t0, $t1, L5 lb $t3, fin($t0) bne $t3, 0x0a, L6 sb $zero, fin($t0) L6: addi $t0, $t0, 1j cleanL5:jr $ra</code></pre>
Hassan Al-Jeshi
A: 

Where did you put that code?! Great Program dude! Congrats.

Unkwnon
Thank you very much. I put that code at the end of the file. And I have called the procedure just after I ask the user to input the file name
Hassan Al-Jeshi