i have this code:
string filePath = ConfigurationManager.AppSettings.Get("FILE_SAVE_PATH") + fileName;
string newFilePath = ConfigurationManager.AppSettings.Get("FILE_SAVE_PATH") + fileName.Replace(".dbf", ".csv");
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WorkingDirectory = ConfigurationManager.AppSettings.Get("FILE_SAVE_PATH");
startInfo.FileName = "cmd.exe";
startInfo.Arguments = string.Format("\"{0}\" \"{1}\" /EXPORT:{2} /SEPTAB", ConfigurationManager.AppSettings.Get("DBF_VIEWER_PATH"), filePath, newFilePath);
try
{
using (Process exeProcess = Process.Start(startInfo))
{
exeProcess.WaitForExit();
}
}
catch{}
The problem is, that it starts command line, and does nothing. It seems that it does not pass arguments to command line (command line is empty). Anybody has an idea where the problem could be?
I resolved my problem. It was in me. I was trying to launch command line and give parameters to it, so it would launch another program with parameters. Isn’t that stupid?
Now i launch the program i need with parameters and it works perfectly: