I\'m trying to run a command-line program and piping in a file. The command works fine on the command-line, but I can\'t seem to get it to work with the Process object in C#
I'm not 100% sure but my guess would be that you have to manually push the data from test.dump
to the process using its StandardInput
property.
Otherwise you could try using cmd.exe
to execute the command:
var psi = new ProcessStartInfo( "cmd.exe /c \"" + command "\"" );
The reason for this is that the ">", "<" and "|" operators are implemented by the shell itself (cmd.exe).