I\'m trying to read a file from the user, in which each line is a cmd.exe command, and run it (it\'s okay to assume the commands are legal), but when I give a c
That's because echo is not an external executable command (i.e., there is no echo.exe file on your hard disk, unless you put it there yourself). It's an internal command of the shell.
You'll probably find that you need to execute something like: