<?xml version="1.0" encoding="UTF-8"?>
<sect1 id="CompareDirs">
  <title>フォルダの比較</title>

  <para>The Folder compare window displays all of the files and subfolders
  compared in a sortable list view. Files and subfolders may be synchronized
  by copying or deleting, and actions may be performed on multiple items
  simultaneously. The columns displayed may be changed and reordered.</para>

  <mediaobject>
    <imageobject>
      <imagedata fileref="screenshots/foldercomp1.png" format="PNG" />
    </imageobject>
  </mediaobject>

  <para>Folder comparison has two different modes. The mode is selected in the
  Open dialog with the "<guilabel>Include
  Subfolders</guilabel>"-checkbox.<itemizedlist>
      <listitem>
        <para>When subfolders are included, all subfolders and their contents
        are compared. Files are displayed depending on the options on the
        <guimenu>View</guimenu> menu (eg, <guimenuitem>Show Identical
        Files</guimenuitem>). Common folders are never displayed (but all
        files inside of them are). Folders only existing on one side are
        displayed according to the <guimenu>View</guimenu> menu options (eg,
        <guimenuitem>Show Left Unique Files</guimenuitem>).</para>

        <para>This mode does not allow browsing folders and can be slow if
        there are many subfolders and files. But it is easy to see and handle
        different files in whole folder structure.</para>
      </listitem>

      <listitem>
        <para>When subfolders are not included only files in selected folders
        and names of subfolders are shown.</para>

        <para>This mode allows browsing folders by opening subfolders and
        parent folders. This mode has the advantage of speed, as it may be
        much faster when there are many subfolders that need not be examined.
        Also the display may be easier to manage, showing only items in one
        folder.</para>
      </listitem>
    </itemizedlist></para>

  <para>In WinMerge version 2.4 and later there is a <guilabel>Compare by
  Quick Contents</guilabel> -compare method which makes possible to compare
  big binary files. For more information about different compare methods see
  <link linkend="Configuration">Options &amp; configuration</link> -chapter.
  In WinMerge version 2.4 and later all files bigger than 4 MB (megabytes) are
  automatically compared with Compare by Quick Contents -method. Downsides for
  this method are that linefilters do not work and there is no difference
  counts information in folder compare UI. For most cases this should not
  matter since so big files usually are binary files.</para>

  <para>For advanced users: If that limit does not feel good (you have lots of
  big text files) it can be changed via registry value: <screen>HKEY_CURRENT_USER\Software\Thingamahoochie\WinMerge\Settings\QuickMethodLimit</screen>.
  As usual be careful when changing values directly to registry!</para>

  <sect2>
    <title><indexterm>
        <primary>フォルダ比較結果</primary>
      </indexterm>比較結果</title>

    <para>Files and folders are compared and divided into several categories.
    Categories are easy to recognize from these icons:<simplelist>
        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/equal.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Identical text files</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/notequal.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Differing text files</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/binary.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Identical binary files</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/binarydiff.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Differing binary files</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/lfolder.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Left-only folders</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/rfolder.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Right-only folders</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/lfile.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Left-only files</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/rfile.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Right-only files</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/folderskip.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Skipped directories (filtered out)</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/fileskip.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Skipped files (filtered out)</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/error.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Items that couldn't be compared. This usually
        happens when other program has locked the file.</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata fileref="screenshots/aborted.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Aborted item. WinMerge did not finish comparing
        this item when compare was stopped. Result is unknown.</member>
      </simplelist></para>
  </sect2>

  <sect2>
    <title>フォルダ比較状態</title>

    <para>During the folder comparison WinMerge shows status panel:</para>

    <para><mediaobject>
        <imageobject>
          <imagedata fileref="screenshots/foldercmp_progress.png" format="PNG" />
        </imageobject>
      </mediaobject></para>

    <para>The panel shows approximate status and progress of the compare.
    Status is shown as a number of items and a progressbar. Numbers show how
    many items (files and folders) WinMerge has found to compare. Progressbar
    shows same info graphically.</para>

    <important>
      <para>Progressbar is for item counts. As there usually are different
      sized files in compare it does not directly map to time used/remaining.
      So 50/100 items does not strictly mean compare is in half by time
      used.</para>
    </important>

    <para>Folder compare can be stopped by selecting
    <guibutton>Stop</guibutton>-button and results for files and folders
    compared so far are shown. When compare is stopped before it finishes,
    some files may be in middle of comparison. Those files are marked as
    <guilabel>Aborted</guilabel> in comparison results. It means result is not
    available for them.</para>

    <para>When folder compare is ready status panel is closed and results are
    shown.</para>

    <note>
      <para>This is one of most visible changes in WinMerge version 2.6. New
      status panel may feel "just too simple" after using previous WinMerge
      versions. The fact is most of the details in previous versions were
      useless during the compare. So simplicity was choosen for new design.
      Automatic closing may also feel weird at starters. But there is no
      information visible that would be needed after the compare.</para>
    </note>

    <para>Compare statistics are visible in separate dialog which can be
    opened after compare from menu: <menuchoice>
        <guimenu>View</guimenu>

        <guimenuitem>Compare Statistics</guimenuitem>
      </menuchoice>.</para>
  </sect2>

  <sect2>
    <title>表示する項目の選択</title>

    <para>In "<guimenu>View</guimenu>" menu there are several choices for
    selecting which categories to show / hide.</para>

    <itemizedlist>
      <listitem>
        <simpara><guimenuitem>Show identical files</guimenuitem> : shows and
        hides files detected as identical</simpara>
      </listitem>

      <listitem>
        <simpara><guimenuitem>Show different files</guimenuitem> : shows and
        hides files detected as different</simpara>
      </listitem>

      <listitem>
        <simpara><guimenuitem>Show left unique files</guimenuitem> : shows and
        hides files and directories present only in left side</simpara>
      </listitem>

      <listitem>
        <simpara><guimenuitem>Show right unique files</guimenuitem> : shows
        and hides files and directories present only in right side</simpara>
      </listitem>

      <listitem>
        <simpara><guimenuitem>Show binary files</guimenuitem> : shows and
        hides files detected as binaries</simpara>
      </listitem>

      <listitem>
        <simpara><guimenuitem>Show skipped files</guimenuitem> : shows and
        hides files and directories filtered out by file filters</simpara>
      </listitem>
    </itemizedlist>
  </sect2>

  <sect2>
    <title><indexterm>
        <primary>フォルダ比較カラム</primary>
      </indexterm>フォルダ比較ウィンドウのカラム</title>

    <para>By default these columns are visible:</para>

    <itemizedlist>
      <listitem>
        <simpara><guilabel>Filename</guilabel></simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Folder</guilabel> : Relative folder name for
        compare path. If subfolders are not included this is empty.</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Comparison result</guilabel> : Verbose comparison
        result (see also <guilabel>Short Result</guilabel>)</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Left Date</guilabel> &amp; <guilabel>Right
        Date</guilabel>: Modification date of item. Note that newer date is
        prefixed with asterisk "<guilabel>*</guilabel>".</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Extension</guilabel> : File's extension, handy for
        sorting</simpara>
      </listitem>
    </itemizedlist>

    <para>Following columns are available through "<guimenuitem>Customize
    Columns</guimenuitem>"-dialog:</para>

    <itemizedlist>
      <listitem>
        <simpara><guilabel>Short Result</guilabel> : Result in shorter form
        ("Right Only").</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Binary</guilabel> : Column contains an asterisk
        "<guilabel>*</guilabel>" when the file is a binary file. This is handy
        for sorting and to use with "<guilabel>Short
        Result</guilabel>"-column.</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Left Attributes</guilabel> &amp; <guilabel>Right
        Attributes</guilabel> : Shows file attributes.</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Left Creation Time</guilabel> &amp; <guilabel>Right
        Creation Time</guilabel> : Item creation time.</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Left Encoding</guilabel> &amp; <guilabel>Right
        Encoding</guilabel> : File encoding. Shows codepage number for ANSI
        files, and Unicode encoding for Unicode files.</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Left File Version</guilabel> &amp; <guilabel>Right
        File Version</guilabel> : Version number from file if present. Note
        that this is read for only some binary file types known to usually
        have a version resource.</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Left Size</guilabel> &amp; <guilabel>Right
        Size</guilabel> : File size in bytes.</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Left Size (Short)</guilabel> &amp; <guilabel>Right
        Size (Short)</guilabel> : Shorter versions of file sizes, rounded to
        kilo-, mega- or gigabytes.</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Newer File</guilabel> : Shows which side is
        newer.</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Differences</guilabel> : Amount of differences
        found between files, not including possibly ignored
        differences.</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Ignored Diff.</guilabel> : Amount of ignored
        differences in files. These are differences ignored by line
        filters.</simpara>
      </listitem>

      <listitem>
        <simpara><guilabel>Left EOL &amp; Right EOL</guilabel> : Show EOL
        style (linefeed style) of files.</simpara>
      </listitem>
    </itemizedlist>
  </sect2>

  <sect2>
    <title>フォルダの参照</title>

    <para>Browsing folders is only possible when subfolders are not included
    to compare (<guilabel>Include Subfolders</guilabel> checkbox is not
    checked in <guilabel>Open</guilabel>-dialog). Parent folders
    ("<guilabel>..</guilabel>"-item) and subfolders existing in both sides can
    be compared by double-clicking with mouse over them or selecting them and
    pressing <keycap>Enter</keycap>.</para>

    <para>Sometimes parent folder cannot be opened (no access to it). These
    two icons indicate if parent folder can be opened:</para>

    <simplelist type="vert">
      <member><inlinemediaobject>
          <imageobject>
            <imagedata fileref="screenshots/folderup.png" format="PNG" />
          </imageobject>
        </inlinemediaobject> Parent folder can be opened.</member>

      <member><inlinemediaobject>
          <imageobject>
            <imagedata fileref="screenshots/folderup_disable.png" format="PNG" />
          </imageobject>
        </inlinemediaobject> Parent folder cannot be opened.</member>
    </simplelist>

    <para>It is possible to browse both sides to the same folder (<filename
    class="directory">C:\Work\</filename> and <filename
    class="directory">C:\Work\</filename>). 2.6 and earlier versions of
    WinMerge prevented this, but it restricted usage in some cases. In such
    case both sides contain the exactly same files and folders.</para>

    <para>It is possible to select two different folders from the folder
    compare and open them to different sides. First selected folder becomes
    the left-side folder and second selected folder becomes the right-side
    folder. This can be used in situation explained in previous paragraph when
    there is same folder compared as both sides.</para>

    <sect3>
      <title><indexterm>
          <primary>一方しか存在しないフォルダを開く</primary>
        </indexterm>一方しか存在しないフォルダ</title>

      <para>WinMerge 2.6 and earlier could not open unique folders (folders
      existing only in other side). An error message was shown about trying to
      open unique folder. This restriction came from a fact that WinMerge
      cannot compare existing folder to non-existing folder. If one wanted to
      copy contents of unique folder, then whole folder structure must been
      copied.</para>

      <para>Copying whole unique folder structure is many times not wanted.
      WinMerge 2.8 allows creating the missing folder and browsing then into
      that created folder. So that contents of original unique folder and
      created empty folder can be compared. Now it is possible to copy just
      one file (or subfolder) in unique folder.</para>

      <para>To navigate into unique folder, select the folder, and browse into
      it as normally (press <keycap>Enter</keycap> -key, double-click over
      foldername with mouse, or select
      <guimenu>Merge</guimenu><guimenuitem>Compare</guimenuitem> from the
      menu. WinMerge shows a message asking if the missing folder should be
      created. Answer <guilabel>Yes</guilabel> to create the folder, or
      <guilabel>No</guilabel> to cancel the action.</para>
    </sect3>
  </sect2>

  <sect2>
    <title>フォルダ比較ウインドウ内の移動</title>

    <para>In addition moving selection using mouse or keyboard, also
    <guimenu>Merge</guimenu>-menu navigation commands, toolbar buttons and
    shortcut keys can be used. For example "<guimenuitem>Next
    diff</guimenuitem>" finds next different file and selects it.</para>

    <note>
      <para>Unique files and folders are considered as different ones.</para>
    </note>

    <para>Multiple files/folders can be selected. However not all operations
    are possible with multi-selection.</para>
  </sect2>

  <sect2>
    <title>フォルダ比較ウインドウ内の操作</title>

    <sect3>
      <title>コピー、移動、削除</title>

      <para>Folder compare allows user to copy and delete files and folders.
      File operations are available through context menu (right-click with
      mouse). Also files can be opened to associated program or into external
      editor.</para>

      <para>In file operation menu, there are one or two numbers shown,
      depending on files/folders selected. If there is one number shown, for
      example "<guimenuitem>Copy/Left to... (5)</guimenuitem>" that means
      there is 5 items selected, and all items can be copied. But if there is
      two numbers shown, for example "<guimenuitem>Copy/Left to... (3 of
      5)</guimenuitem>", that means there are 5 items selected but only 3
      items can be copied.</para>

      <para>Most common operation is copying files from side to side. File can
      be copied from side to side using <guimenu>Merge</guimenu>-menu items,
      toolbar buttons and context menu. If multiple files are selected, or
      file to overwrite is read-only, confirmation dialog is shown.</para>

      <para>Sometimes it is useful to copy certain files and/or folders to
      another folder instead of another compared folder. This can be done
      selecting "<guimenuitem>Copy/Left to...</guimenuitem>" or
      "<guimenuitem>Copy/Right to...</guimenuitem>" items.</para>

      <para>Another file/folder operation is deleting. Items in another or
      both sides can be deleted. There is "<guilabel>Send deleted files into
      Recycle Bin</guilabel>" option in system options (See <link
      linkend="Configuration">Options &amp; Configuration</link> -chapter). It
      is highly recommended to keep that option enabled so deletion can be
      undone if accidents happen. Note however recycle bin does not help if
      its disabled from Windows settings.</para>

      <para>Moving is just a shortcut for copy + delete.</para>

      <warning>
        <para>File/folder deletion cannot be undone if <guilabel>Recycle
        Bin</guilabel> is not used!</para>
      </warning>
    </sect3>

    <sect3>
      <title>名前の変更</title>

      <para>Renaming files and folders is available through context menu item
      <guimenuitem>Rename</guimenuitem> or using <keycap>F2</keycap> -shortcut
      key. Edit-box appears and allows editing of the name. Renaming can be
      cancelled by pressing <keycap>Esc</keycap> -key. Note that items in both
      sides are renamed. Renaming just other side is not currently
      possible.</para>
    </sect3>

    <sect3>
      <title>ファイルを開く</title>

      <para>There are three items in <guimenu>Open</guimenu>-menus:</para>

      <itemizedlist>
        <listitem>
          <simpara><guimenuitem>With Registered Application</guimenuitem> :
          Opens file with application registered for editing filetype for
          Windows, if there is one.</simpara>
        </listitem>

        <listitem>
          <simpara><guimenuitem>With External Editor</guimenuitem> : Open with
          external editor. Default editor can be selected from options,
          Notepad is used by default.</simpara>
        </listitem>

        <listitem>
          <simpara><guimenuitem>With ...</guimenuitem> : Opens "<guilabel>Open
          With...</guilabel>" dialog asking from user with which application
          files should be opened.</simpara>
        </listitem>
      </itemizedlist>

      <tip>
        <para>Selecting <guilabel>With Registered Application</guilabel> when
        folder is selected usually opens that folder into new Explorer
        window.</para>
      </tip>
    </sect3>

    <sect3>
      <title>圧縮</title>

      <para><guimenu>Zip</guimenu>-menu in directory compare context menu
      allows adding selected items to archive file.</para>

      <note>
        <para>Archive support requires that 7-Zip plugin is installed to
        system.</para>
      </note>

      <para>Zip-submenumenu has four items:</para>

      <itemizedlist>
        <listitem>
          <simpara><guimenuitem>Left...</guimenuitem> : Adds left-side files
          and folders (recursively) to the archive file</simpara>
        </listitem>

        <listitem>
          <simpara><guimenuitem>Right...</guimenuitem> : Adds right-side files
          and folders (recursively) to the archive file</simpara>
        </listitem>

        <listitem>
          <simpara><guimenuitem>Both...</guimenuitem> : Adds files and folders
          (recursively) from both sides to the archive file. Because filenames
          are same, files must be put to subfolders inside archive. Left-side
          files are put to subfolder <filename
          class="directory">Original/</filename> and right-side files are put
          to subfolder <filename
          class="directory">Altered/</filename>.</simpara>
        </listitem>

        <listitem>
          <simpara><guimenuitem>Differences...</guimenuitem> : This is like
          above <guimenuitem>Both</guimenuitem>, but this item adds only
          different files (including unique files) from both sides.</simpara>
        </listitem>
      </itemizedlist>

      <para>After selecting one of <guimenu>Zip</guimenu>-menu items dialog
      pops up asking filename and archive type from user. WinMerge cannot add
      files to existing archive files but it always creates new archive
      file.</para>

      <tip>
        <para>WinMerge looks for subfolders <filename
        class="directory">Original/</filename> and <filename
        class="directory">Altered/</filename> in archive files. If archive
        file contains these subfolders and same filename is given to both
        sides WinMerge compares contents of those two folders.</para>
      </tip>

      <para>If directory compare shows contents of archive files WinMerge
      updates changes done to files in file compare into original archive
      file. But WinMerge does not update archive contents for files
      added/deleted/copied. User can create a new archive file using above
      menuitems instead.</para>
    </sect3>
  </sect2>

  <sect2>
    <title>パス名またはファイル名のコピー</title>

    <para>In context menu there are items for copying selected items' paths or
    filenames to clipboard. This feature makes it easy so get list of changed
    files, for changelogs etc.</para>

    <itemizedlist>
      <listitem>
        <simpara><guimenuitem>Copy Pathnames</guimenuitem> has three
        subchoices like other file handling functions. It copies full
        pathnames of selected items to clipboard, one per line.</simpara>
      </listitem>

      <listitem>
        <simpara><guimenuitem>Copy Filenames</guimenuitem> copies only
        filenames without paths.</simpara>
      </listitem>
    </itemizedlist>
  </sect2>

  <sect2>
    <title>フォルダ比較ウインドウのカスタマイズ</title>

    <para>There are many ways to customize folder compare:<itemizedlist>
        <listitem>
          <simpara>Sorting by column : Sorted by column can be selected by
          clicking column name with mouse. Little arrow appears next to column
          name indicating that results are sorted by this column and sort
          order.</simpara>
        </listitem>

        <listitem>
          <simpara>Selecting visible columns : "<guilabel>Display
          Columns</guilabel>" dialog can be opened from
          <guimenu>Tools</guimenu>-menu or by right-clicking column header
          with mouse.</simpara>
        </listitem>

        <listitem>
          <simpara>Changing order of columns : Order can be changed in
          "<guilabel>Display Columns</guilabel>" dialog or by drag &amp;
          dropping column names with mouse.</simpara>
        </listitem>
      </itemizedlist></para>
  </sect2>

  <sect2>
    <title>フォルダの保護 / フォルダの読取り専用化</title>

    <para>If user wants to protect one or both sides from changes, user can
    set them to read-only from <guimenu>File</guimenu>-menu.</para>

    <important>
      <para>Setting read-only protects files and folders in current compare
      view only.</para>
    </important>

    <para>Protected status is inherited to opened files from directory
    compare. If user compares two folders, sets another to protected and opens
    two files for comparing, file opened from protected side has protection
    set too.</para>

    <para>Protection status is shown in statusbar, there are own panes for
    left and right side.</para>
  </sect2>

  <sect2>
    <title><indexterm>
        <primary>ファイルとフォルダの非表示</primary>
      </indexterm>項目の非表示</title>

    <para>Selected items can be hidden from view using context menu item
    <guimenuitem>Hide Items</guimenuitem>. Hidden items are not shown until
    next refresh is done. All hidden items can be re-shown selecting
    <menuchoice>
        <guimenu>View</guimenu>

        <guimenuitem>Show Hidden Items</guimenuitem>
      </menuchoice>.</para>

    <para>Hiding items is handy to remove already handled items from the view.
    So when you have merged files, use context menu item to hide them. It is a
    lot easier to see what items are left to merge. Get used to it! It saves
    your time!</para>
  </sect2>

  <sect2>
    <title>選択項目のみの最新化</title>

    <para>Full refresh of large folders can take a long time. In 2.2 and
    earlier versions of WinMerge user always had to do full refresh after
    editing files outside WinMerge. WinMerge 2.4 and later can refresh just
    selected items. Select <guimenuitem>Refresh</guimenuitem> from the context
    menu or <menuchoice>
        <guimenu>View</guimenu>

        <guimenuitem>Refresh Selected</guimenuitem>
      </menuchoice> from the main menu.</para>
  </sect2>
</sect1>
