Compare and merge two files using WinMerge比較とマージの2つのファイルを使用してWinMerge

Posted on November 17, 2008 at 5:54 am 11月17日、午前5:54に2008年に投稿

If you have been on a situation wherein you need to compare two large text files or folders then this tutorial is for you.  In this example, given two almost identical text files,  I will show you how to determine the lines that have a mismatch.状況にされている場合はいかにしてこのチュートリアルをして2つの大きなテキストファイルまたはフォルダを比較する必要がある場合です。この例では、ほぼ同一のテキストファイルの2つのことを考えると、私は、不整合がどのように決定するために行が表示されます。

In a manual brute force scenario, this is painstakingly difficult to do especially for large text files.  The free tool is called WinMerge and you can get it from手動で力ずくのシナリオでは、特に大きなテキストファイルのために苦労するのは難しい。 WinMergeこの無料ツールと呼ばれ、あなたからそれを得ることができます http://winmerge.org/ .  It is called WinMerge because it runs in Windows and it lets you merge the content of your files (ie you want to use the newer version of the text file). 。ため、 Windowsでの動作はWinMergeと呼ばれ、お使いのファイルの内容をマージすることができます(あなたが、テキストファイルの新しいバージョンを使用する場合)すなわち。

You can begin comparing two files by going to the Open menu:あなたは、 Openメニューに移動して、 2つのファイルを比較することができます:

イメージ

You will  be asked to enter the file names.  The file you entered on the left will appear on the left side of the screen while the right will appear on the opposite side.  The idea is to compare the two files side by side:場合は、ファイル名を入力することになります。この場合は、左側には、右の反対側に表示される画面の左側に表示される入力ファイルを作成します。このアイデア側では、 2つのファイルを比較する側されます:

イメージ

Press ok after entering the filenames.  In this case I entered two files called 1.epj and 2.epj which are plain text files.ファイル名を入力後、 [ OK ]を押します。この例ではIおよび1.epjと呼ばれる2つのファイルを入力2.epjはテキスト形式のファイルです。

Once you click OK, it will process the two files quickly and display the side-by-side comparison like below: [ OK ]をクリックしたら、すぐに2つのファイルを処理させていただきますとの比較では、以下のようなサイド側の表示:

イメージ

The leftmost side, called Location Pane, contains a scaled “map” of the text file where you can see 3 yellow lines where the relative position of the mismatches are.  This is very usable so you can navigate to the mismatches quickly.  You can click any part of the Location Pane to jump to that part of the file.一番左サイド、場所ペインと呼ばれる場所での不整合の相対位置が3黄色のラインを見ることができます。ので、すぐに不整合に移動することができますこれは非常に使用されているテキストファイルのスケーリング"地図"を含んでいます。をクリックすることができます場所パネルの任意の部分は、ファイルのその部分にジャンプします。

The main window will show the two files side-by-side and from this interface it is very easy to see where the mismatches are.メインウィンドウでは、 2つのファイルが表示されますサイド側とは非常に簡単ですから、このインターフェイスは、ミスマッチしている。

The View menu offers some functionality that you might find useful: [表示]メニューに有用なことを見つけるかもしれないいくつかの機能を提供しています:

イメージ

For people working with UNIX scripts, the white spaces are important.  You can use the View Whitespace option to be able to view the whitespace.  The white spaces will appear as a tick-like character:人々のUNIXスクリプトでの作業については、ホワイトスペースが重要です。あなたは空白の表示オプションを使用することができます空白を表示できるようにする。ホワイトスペース文字のようなダニとして表示されます:

イメージ

If your boss or programs (ie UNIX scripts) are sensitive to white spaces, this is an excellent tool to determine where those “invisible” spaces are.もしあなたの上司やプログラム(例えば、 UNIXのスクリプト)ホワイトスペースに敏感は、この場所は"目に見えない"スペースがあると判断するための優れたツールです。

Upon determining the differences, there are times that we need to merge the files.  In this case I can replace the line from the left with the line from the right using the replace buttons:の違いを決定する時に、ある時は、我々のファイルをマージする必要があります。この場合には私から、行を置き換えることができますが、行を右から左のボタンを使用することで置き換える:

イメージ

You can use the button to replace a line on the left side by the line on the right side (or vice versa).あなたが右側のライン(またはその逆で、左サイドに線を交換する)のボタンを使用することができます。

イメージ

After clicking the button, the mismatch will disappear (after it “merged” the line):ボタンをクリックすると、不整合(後に" "は、ライン)合併れなくなります:

イメージ

Overall, WinMerge is one powerful dif tool.全体的に、 WinMerge一dif強力なツールです。 It is easy to use and should be good enough for most file and folder comparison.  It’s merging capability also helps most writers who need to use a new version of a certain portion of a document.これを使用するように、十分なほとんどのファイルとフォルダの比較のためにとって良いことを簡単です。それはまた、文書の特定の部分の新しいバージョンを使用する必要があるほとんどの作家に役立つ機能をマージする。

Ben Carigtan writes about technology, computers, websites and how to get the best out of them.ベンCarigtan技術について書いて、コンピュータ、ウェブサイトやそれらの最善の方法を入手してください。

Enjoyed this post?この投稿を楽しんだか? Subscribe to Online Tech Tips viaチャンネル登録オンライン技術のヒントを経由 RSS Feed RSSフィード or viaまたは経由 Emailメール and receive free daily productivity tips.日々の生産性のヒントと受信は無料。

» Filed Under »ファイルの下で Computer Tipsコンピュータのヒント

おいしいに追加 Save this page このページを保存 Mixxは、 Stir it up on Mixx かき混ぜるそれをミックス
しかし Add to Reddit しかしに追加 StumbleUponの Stumble this page このページつまずく

Related Posts 関連記事

One Response to “Compare and merge two files using WinMerge” 1つの応答"の2つのファイルを比較、マージWinMergeを使用して "

  1. restful web 安らかなウェブ said on :によると:

    WinMerge is a must-have tool for me, especially when working with shared version control systems like subversion or CVS. WinMergeは、私にとって、特に共有のSubversionやCVSのようなバージョン管理システムでの作業ツールが必要です。 Saves me a lot of time.私に多くの時間を保存します。

    One of its best features is the ability to compare two directories. 1つは、最高の機能の能力の2つのディレクトリを比較することです。 That’s great when you have a bug-fix branch that needs to be merged with the development branch.とするとき、バグの修正が必要とする開発ブランチ支店と合併する必要がある素晴らしいことだ。


    Please post your comments/suggestions! コメントを投稿してください/ご提案!