System.Diagnostics.Process proc0 = new System.Diagnostics.Process();
proc0.StartInfo.FileName = "cmd";
proc0.StartInfo.WorkingDirectory = Path.Combine(curpath, "snd");
proc0.StartInfo.Arguments = omgwut;
And now for some background...
string curpath = System.IO.Path.GetDirectoryName(Application.ExecutablePath);
omgwut is something like this:
copy /b a.wav + b.wav + ... + y.wav + z.wav output.wav
And nothing happens at all. So obviously something's wrong. I also tried "copy" as the executable, but that doesn't work.
Try this it might help you.. Its working with my code.
Try the prefixing your arguments to cmd with
/C
, effectively sayingcmd /C copy /b t.wav ...
According to
cmd.exe /?
using/C <command>
For your code, it might look something like
Notes:
cmd.exe copy ...
you'll see that the copy doesn't occur.2,003
characters in .NET Framework applications and488
characters in .NET Compact Framework applications."System.IO
classes to open the files and manually concatenate them.Even you can try this.. this is even better.
Daniels cmd /c idea will work. Keep in mind there is a limit to the length of a command line probably 8k in your case see this for details.
Since you are in a .Net app anyway, File.Copy may be quite a bit easier/cleaner than this approach.