string strCmdText = "/C copy /b Image1.jpg +Archive.rarImage2.jpg"; System.Diagnostics.Process.Start("CMD.exe",strCmdText);
这是为了隐藏cmd窗口。
System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; startInfo.FileName = "cmd.exe"; startInfo.Arguments = "/C copy /b Image1.jpg +Archive.rarImage2.jpg"; process.StartInfo = startInfo; process.Start();