C#Winフォーム
こんにちは。CMDウィンドウは「指定されたファイルが見つかりません」と表示し続けますCMDウィンドウにコマンドを入力すると「copy/b myfile.txttest.txt」が機能します:S
ところで:CMDウィンドウでコマンドが実行されるのを実際に確認する方法はありますか?
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 \""+fi.Name+"\"test.txt";
//process1.StartInfo.LoadUserProfile = true;
process1.StartInfo.FileName = "cmd.exe\"/k";
process1.StartInfo.WorkingDirectory = Path.GetDirectoryName(fi.FullName);
process1.Start();
process1.Dispose();
process1.Close();
}
}