以前我都用FreeCommander,但功能實在太弱,所以在前2年改用 Multi Commander ,Multi Commander 的功能逼近 Total Commander,但是一直沒有比對文字檔顯示差異的功能,所以只能找擴充方法,在論壇上找到呼叫WinMerge去比對的方法,但是它的Script要修改一下。
首先,在Multi Commander 的選單選擇 組態 -> 使用者定義的命令
開啟 使用者命令 後,新增 一個命令,類型選 Multi-Script
在命令區填入以下指令
@var $cmd = "C:\\Program Files\\WinMerge\\WinMergeU.exe"; // 改成你安裝WinMerge的路徑
@var $selectedPaths = GetSelectedPaths();
@var $sourcePath;
@var $targetPath;
if (arrayCount($selectedPaths) == 2)
{
$sourcePath = $selectedPaths[0];
$targetPath = $selectedPaths[1];
}
else
{
$sourcePath = GetTagValue("${leftfocuspath}");
$targetPath = GetTagValue("${rightfocuspath}");
}
MC.Run CMD='{$cmd}' ARG='/s /r /e /x /u /maximize "{$sourcePath}" "{$targetPath}"'
如果 WinMerge不是裝在預設目錄,請自行修改。接著選擇 組態 -> 功能表自訂
在此一定要新增一個自訂的功能表,才有辦法加入自訂命令
留言