[英]Relog Can't Find the File
我正在嘗試從應用程序讀取BLG文件。 我可以從我的應用程序中讀取CSV文件,但是我還想添加另一種表單來將BLG文件轉換為CSV。 不幸的是,我收到一條錯誤消息,提示找不到文件。 這是代碼:
object command;
string dosyaAdi;
private void btnCevir_Click(object sender, EventArgs e)
{
try
{
dosyaAdi = openFileDialog1.FileName;
command = "relog "+dosyaAdi+".blg -f CSV -o "+dosyaAdi+".csv";
System.Diagnostics.ProcessStartInfo procStartInfo =
new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);
procStartInfo.RedirectStandardOutput = true;
procStartInfo.UseShellExecute = false;
procStartInfo.CreateNoWindow = true;
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo = procStartInfo;
proc.Start();
string result = proc.StandardOutput.ReadToEnd();
MessageBox.Show(result);
}
catch (Exception objException)
{
}
}
謝謝您的幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.