1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

WinMerge で 比較結果のフィルタリングを実現する

Posted at

やりたいこと

  • WinMerge で、フォルダを比較した結果から、特定のファイル名やフォルダ名でフィルタリングしたい

解決した方法

フィルターファイルの準備

  • 任意のファイル名で xxxx.flt ファイルを、Documentsディレクトリ 配下に配置する。
    • ドキュメント ディレクトリ 以下に配置する理由としては、そこに配置するとデフォルトでWinMerge上から読み込まれるから。
  • 下記ファイルのように name:desc:def:f:d: を定義する。
  • f: はファイル、d: はディレクトリに一致させたいパターンを定義する(正規表現使用可)
  • d: に一致する、f: のみを表示」(もしくは除外)のようなことが出来る。
    • def: に設定する値は下記(直観とは逆だったりする)
      • のみ表示したい場合は、exclude
      • 以外を表示したい場合は、include
xxxxx.flt
## This is a directory/file filter template for WinMerge
name: xxxx
desc: search xxxx
## 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: exclude
## 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: xxxx$ ## Filter for filename
d: \\*$ ## Filter for directory

フィルターファイルを適用した上で比較を実行

  • ディレクトリ同士を比較する際のUI(1番目のファイルまたはフォルダーとかが書いてあるUI)の左下に「フォルダー: フィルター」という欄があるので、そこで flt ファイル を指定してください。
    • デフォルトでは「*.*」(=全て)になっております。
  • サブフォルダーを含める場合は、☑を有効にしてください。
検索用キーワード
  • WinMerge、ウィンマージ、うぃんまーじ
  • Filtering、filter、正規表現、Regex
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?