BComp.exe /silent /closescript /solo @E:\compareTest\BCbatch.txthtml
text-report layout:side-by-side options:display-all,line-numbers title:"report" output-to:"E:\compareTest\report.htm" output-options:wrap-word,html-color "E:\Edit1" "E:\Edit2"html5
http://html5.codemach.com/beyondcompare-jiao-ben-bi-jiao-wen-jian-bing-sheng-cheng-html-ge-shi-de-cha-yi-bao-gao.htmlwindows
说明:如下内容在Windows环境下验证OKsession
一、将Beyond Compare的安装路径添加到环境变量,以便在命令行中运行BCompare.exe命令app
二、新建一个文本文件diff_to_html.txt,输入并保存如下内容:less
text-report layout:side-by-side &
options:ignore-unimportant,display-context &
output-to:%3 output-options:html-color %1 %2ide
三、在命令行中,运行如下命令:ui
> BCompare.exe /silent @diff_to_html.txt my_file.txt your_file.txt my_report.htmlspa
注意:这里假设*.txt、*.html都在当前工做目录中;其余状况下,请在文件名前加上相应的路径前缀Beyond Compare脚本:比较文件并生成html格式的差别报告.net
--------------------------------------------------------------------------------------------------------------------------------------------------
新建一个文本文件,假设命名为BCbatch.txt,只有一行内容以下:
file-report layout:side-by-side options:display-all,line-numbers output-to:"report.htm" output-options:wrap-word,html-color "比较文件1的全路径" "比较文件2的全路径"
而后在命令行下执行:
BC.exe @BCbatch.txt
http://www.scootersoftware.com/help/index.html?command_line_reference.html
Command Line Reference |
Command Line Parameters Notice that each parameter should be enclosed in quotation marks if it might contain a space. Note Linux users should use "bcompare" instead of "BCompare.exe".
Command Line Switches Note Linux users should prefix the switches with "-" instead of "/".
DOS Error Levels set on exit
Command Line Executable Files
|