I'm trying to read a BLG file from my application. I can read a CSV file from my application, but I also want to add another form to convert a BLG file to CSV. Unfortunately I'm getting an error that it says file cannot be found. Here is the code:
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)
{
}
}
Thank you for your help.