I got this program written in C# WinForms.
im using system.diagnostic to create a CMD process. with that cmd i want some arguments but they are not present or working :S dont know why ?!
NOTE: im not sure how to use more than 1 argument, correct me if im wrong :D im trying to replicate the "copy /b %filename% lpt1" command....
here is my code:
public void OutputBtn_Process_Click(object sender, EventArgs e)
{
foreach (FileInfo fi in listBox1.Items)
{
Process process1 = new Process();
process1.StartInfo.UseShellExecute = false;
process1.StartInfo.Arguments = "copy /b myfile.txt test.txt";
//process1.StartInfo.LoadUserProfile = true;
process1.StartInfo.FileName = "cmd.exe";
process1.StartInfo.WorkingDirectory = Path.GetDirectoryName(fi.FullName);
process1.Start();
}
}