Originally posted by Aaron
View Post
Batch File
echo off
set arg1=%1
set arg2=%2
set arg3=%3
"C:\Program Files (x86)\Beyond Compare 3\BCompare.exe " "@c:\temp\BCTextScript.txt" /silent %arg1% %arg2% %arg3%
C# code
public void BeyondCompare(string cmFilePath, string rwFilePath)
{
string finalFile = ComparisonResultsPath + Path.DirectorySeparatorChar +
Path.GetFileNameWithoutExtension(cmFilePath) + ".html";
//string command = @"""C:\\Program Files (x86)\\Beyond Compare 3\\BCompare.exe""" + " /@C:\\temp\\BCTextScript.txt" + " /silent " + cmFilePath + " " + rwFilePath + " " + finalFile;
System.Diagnostics.Process proc1 = new System.Diagnostics.Process();
proc1.StartInfo.FileName = @"C:\Temp\BCTextScript.bat";
proc1.StartInfo.Arguments = $""{cmFilePath}" "{rwFilePath}" "{finalFile}"";
proc1.StartInfo.CreateNoWindow = false;
proc1.StartInfo.UseShellExecute = false;
proc1.StartInfo.RedirectStandardInput = true;
proc1.Start();
proc1.WaitForExit();
}
Thanks for the guideance
Leave a comment: