tool

【WinMerge】binなどの動的フォルダを除外する設定

プログラマーに必須のDIFFツール。そのなかでもWinMergeはとても優秀ですよね。
今回はWinMergeの比較対象から動的フォルダを除外する設定を備忘録として残します。

ここでいう動的フォルダとは、

・Visual Studioで作成される「bin」「obj」「.vs」
・EclipseなどでJava開発時に作成される「classes」
・SVN管理化の場合の「.svn」

などのことです。
 

今回は上記のフォルダを比較時に除外する設定を行います。
なんなら上記設定を記述したファイルを用意したので、そのままWinMergeでインストールしてもOKです。
ファイル:Exclude Binary&SVN.flt


フィルタの設定方法

①WinMergeの比較画面で赤枠の選択ボタンを押下します。
WinMergeの比較画面

②フィルタの一覧が表示されるので、新規ボタンを押下します。
新規ボタンをクリック
冒頭で書いたように既にフィルタファイルがある場合は、インストールを押下してファイルを選択すれば終わりです。

③ファイル名を入力すると、自動的にテキストが表示されます。
デフォルトの記述

④赤枠内の内容を変更します。
変更内容

変更後ファイル↓


## This is a directory/file filter template for WinMerge
name: Exclude Binary&SVN
desc: Exclude Binary&SVN

## Select if filter is inclusive or exclusive
## Inclusive (loose) filter lets through all items not matching rules
## Exclusive filter lets through only items that match to rule
## include or exclude
def: include

## Filters for filenames begin with f:
## Filters for directories begin with d:
## (Inline comments begin with " ##" and extend to the end of the line)

f: \.svn$       ##「.svn」ファイルは比較除外
f: \.svn-base$  ##「.svn-base」ファイルは比較除外

d: \\.svn$      ##「.svn」フォルダは比較除外
d: \\.vs$       ##「.vs」フォルダは比較除外
d: \\bin$       ##「bin」フォルダは比較除外
d: \\obj$       ##「obj」フォルダは比較除外
d: \\Release$   ##「Release」フォルダは比較除外
d: \\Debug$     ##「Debug」フォルダは比較除外
d: \\classes$   ##「classes」フォルダは比較除外

あとは一覧で上記の設定を選択して比較すればフィルタが適用されます。


 

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です