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
|