<?xml version="1.0" encoding="UTF-8"?>
<article id="Compare_dirs">
  <title>Comparing and merging folders<indexterm>
      <primary>comparing folders</primary>
    </indexterm></title>

  <para>This topic describes how to compare and merge folders using the Folder
  Compare window.</para>

  <section id="Compare_dirs_starting">
    <title>Starting a folder compare operation</title>

    <para>You can begin a folder compare operation from either the WinMerge
    window or a Command Prompt window.</para>

    <variablelist>
      <varlistentry>
        <term>From the WinMerge window</term>

        <listitem>
          <para>Click <menuchoice>
              <guimenu>File</guimenu>

              <guimenuitem>Open</guimenuitem>
            </menuchoice>. Use the Select Files or Folders dialog to specify the
          left and right folders to compare. By default, the compare includes
          all files in the folders, and is recursive (does include
          subfolders). To change any of these options and for more details about
          the Select Files or Folder dialog, see <xref
          linkend="Open_paths" />.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>From a Command Prompt window</term>

        <listitem>
          <para>Run <command>WinMergeU.exe</command>, which is in your WinMerge
          install directory. In your command arguments, include the left and
          right folders to compare. By default, the compare includes all files
          in the folders, and is nonrecursive. To change any of these options
          and for information about other command options, see <xref
          linkend="Command_line" />.</para>
        </listitem>
      </varlistentry>
    </variablelist>

    <tip>
      <title>Tips</title>

      <variablelist>
        <varlistentry>
          <term>Recursive mode<indexterm>
              <primary>recursive folder compare</primary>
            </indexterm></term>

          <listitem>
            <para>Recursive mode is useful for detecting and manipulating
            different files in an entire folder structure. However, it can be
            slow if there are many subfolders and files. For deeply nested
            directory structures, consider enabling the <xref
            linkend="Compare_dirs_treeview" /> for easier navigation of the
            Compare window.</para>

            <para>Nonrecursive mode has the advantage of speed when there are
            many subfolders that need not be examined. Also, the display can be
            easier to manage because it shows items in only selected
            folders.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Quick Contents comparisons</term>

          <listitem>
            <para>The <guilabel>Quick Contents</guilabel> method for file
            comparison, described in <xref linkend="Configuration" />, can be
            useful when you compare big binary files; and it is automatically
            used to compare files bigger than 4 MB. Possible disadvantages are
            that line filters do not work, and there is no difference counts
            information in the Folder Compare window. This should not matter In
            most cases, because such large files are usually binary.</para>

            <para>To use this method, configure it before your compare
            operation: in the Compare page of the WinMerge options, click the
            <guilabel>File Compare method</guilabel> drop-down menu and choose
            <guimenuitem>Quick Contents</guimenuitem>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>For advanced users</term>

          <listitem>
            <para>You can change the 4 MB file size limit of the
            <guilabel>Compare by Quick Contents</guilabel>, for example if you
            have a lot of very big text files. To do so, run the Windows
            <command>regedit</command> command, navigate to this keyword, and
            modify its value: <screen>HKEY_CURRENT_USER\Software\Thingamahoochie\WinMerge\Settings\QuickMethodLimit</screen>As
            usual, be careful when editing the registry!</para>
          </listitem>
        </varlistentry>
      </variablelist>
    </tip>

    <section>
      <title>Folder Compare Progress window<indexterm>
          <primary>Folder Compare Progress window</primary>
        </indexterm></title>

      <para>When you start a folder compare operation, WinMerge displays this
      status window:</para>

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

        <textobject>
          <phrase>Folder Compare Progress window</phrase>
        </textobject>
      </mediaobject>

      <para>If the compare operation is quick, you might not notice the Progress
      window, which closes as soon as WinMerge displays the Folder Compare
      result. The Progress window shows the number of files and folders to be
      included in the operation, and the number compared so far. The progress
      bar graphically represents the Items compared.</para>

      <note>
        <para>Because the files compares are usually of different sizes, the
        status data does not indicate the time used or remaining. For example, a
        50/100 ratio does not necessarily mean that half of the compare
        operation time is expired.</para>
      </note>

      <para>You can click <guibutton>Stop</guibutton> to terminate the operation
      at any time before the compare operation finishes. The Folder Compare
      window is displayed with the results calculated at that time, omitting any
      uncompleted results.<!--I'm not able to reproduce the behavior documented in the earlier version of this topic: 
I get the partial list, but no Abort indicator.--></para>
    </section>
  </section>

  <section id="Compare_dirs_window">
    <title>Folder Compare window<indexterm>
        <primary>Folder Compare window</primary>

        <seealso>Compare window</seealso>
      </indexterm><indexterm>
        <primary>Compare window</primary>

        <secondary>Folder</secondary>
      </indexterm><indexterm>
        <primary>subfolders</primary>

        <secondary>in Folder Compare window</secondary>
      </indexterm></title>

    <para>The Folder Compare window shows the result of a folder compare. Two
    different views are available:</para>

    <variablelist>
      <varlistentry id="Compare_dirs_tabview">
        <term>Tabular view<indexterm>
            <primary>tabular view, Compare window</primary>
          </indexterm></term>

        <listitem>
          <para>In tabular view, each file or folder in the result is listed in
          a row. This is the default view. Here's an example:</para>

          <mediaobject>
            <imageobject>
              <imagedata contentwidth="600"
                         fileref="screenshots/foldercomp1.png" format="PNG" />
            </imageobject>
          </mediaobject>
          <para></para>
        </listitem>
      </varlistentry>

      <varlistentry id="Compare_dirs_treeview">
        <term remap="" xreflabel="tree view">Tree view<indexterm>
            <primary>tree view, Compare window</primary>
          </indexterm></term>

        <listitem>
          <para>In the tree view, folders are expandable and collapsible,
          containing files and subfolders. The tree view is available only in
          recursive compares. For example:</para>

          <mediaobject>
            <imageobject>
              <imagedata contentwidth="599"
                         fileref="screenshots/treeview-01.png" format="PNG" />
            </imageobject>
          </mediaobject>
          <para></para>

          <itemizedlist>
            <listitem>
              <para>To expand or collapse a single folder, click the plus or
              minus control beside the folder icon, or double-click anywhere in
              the row.</para>
            </listitem>

            <listitem>
              <para>To expand or collapse all folders in the view, click
              <menuchoice>
                  <guimenu>View</guimenu>

                  <guimenuitem>Expand Subfolders</guimenuitem>
                  <guimenuitem>All Subfolders</guimenuitem>
                </menuchoice> or <menuchoice>
                  <guimenu>View</guimenu>

                  <guimenuitem>Collapse All Subfolders</guimenuitem>
                </menuchoice> in the menu.</para>
            </listitem>
          </itemizedlist>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>During a recursive compare (that is, if you enabled the
    <option>Include subfolders</option> option in the Select Files or Folders
    dialog when you launched the compare), you can click <menuchoice>
        <guimenu>View</guimenu>

        <guimenuitem>Tree Mode</guimenuitem>
      </menuchoice> command to switch between the two views. The <menuchoice>
        <guimenu>View</guimenu>

        <guimenuitem>Tree Mode</guimenuitem>
      </menuchoice> command is disabled for non-recursive compares.</para>

    <para>In both views, the columns show different types of data for each
    result item. You can control the sorting of items in the view by clicking a
    column heading. This changes the sorting in two ways:</para>

    <itemizedlist>
      <listitem>
        <para>Toggles (reverses) the sort order of the column.</para>
      </listitem>

      <listitem>
        <para>Resorts all the rows in the view by the column.</para>
      </listitem>
    </itemizedlist>

    <section>
      <title>Recursive and nonrecursive compare results<indexterm>
          <primary>recursive folder compare</primary>

          <secondary>results view</secondary>
        </indexterm><indexterm>
          <primary>nonrecursive folder compare</primary>

          <secondary>results view</secondary>
        </indexterm></title>

      <para>The Folder Compare window looks and behaves slightly differently for
      recursive and nonrecursive compares:</para>

      <variablelist>
        <varlistentry>
          <term>Recursive folder compare</term>

          <listitem>
            <para>The compare result includes all subfolders. You can control
            the types of items displayed within the folders by choosing the
            options in the <guimenu>View</guimenu> menu (for example,
            <guimenuitem>Show Identical Items</guimenuitem>). The Folder column
            is always empty: only the files within the folders are displayed. To
            see an item's subfolder, look at its path in the Compare result
            column. Folders that exist on only one side are displayed if one of
            the <guimenu>View</guimenu> menu options, <guimenuitem>Show Left
            Unique Files</guimenuitem>, <guimenuitem>Show Middle Unique Files
            </guimenuitem> or <guimenuitem>Show Right Unique
            Files</guimenuitem>, is enabled.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Nonrecursive folder compare</term>

          <listitem>
            <para>The result includes only the files and subfolders at the top
            level of the selected folders. However, you can browse to any
            subfolder that you want to compare.</para>
          </listitem>
        </varlistentry>
      </variablelist>
    </section>

    <section>
      <title>File and folder icons<indexterm>
          <primary>icons</primary>

          <secondary>Folder Compare window</secondary>
        </indexterm></title>

      <para>In the Folder Compare window, files and folders are compared and
      divided into several categories. In each row, the category is clearly
      identified in the left column with one of these icons:</para>

      <simplelist>
        <member><inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="16"
                         fileref="screenshots/equaltextfile.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Identical text files</member>

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

        <member><inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="16" fileref="screenshots/equal.png"
                         format="PNG" />
            </imageobject>
          </inlinemediaobject> Identical files (type undetermined)</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="16"
                         fileref="screenshots/notequaltextfile.png" format="PNG" />
            </imageobject>
          </inlinemediaobject> Different text files</member>

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

        <member><inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="16" fileref="screenshots/notequal.png"
                         format="PNG" />
            </imageobject>
          </inlinemediaobject> Different files (type undetermined)</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="16" fileref="screenshots/foldersame.png"
                         format="PNG" />
            </imageobject>
          </inlinemediaobject> Identical folders (in tree view only)</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="16" fileref="screenshots/folderdiff.png"
                         format="PNG" />
            </imageobject>
          </inlinemediaobject> Different folders (in tree view only)</member>

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

        <member><inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="16" fileref="screenshots/mfolder.png"
                         format="PNG" />
            </imageobject>
          </inlinemediaobject> Middle-only folders</member>

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

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

        <member><inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="16" fileref="screenshots/mfile.png"
                         format="PNG" />
            </imageobject>
          </inlinemediaobject> Middle-only files</member>

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

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

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

        <member><inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="16" fileref="screenshots/error.png"
                         format="PNG" />
            </imageobject>
          </inlinemediaobject> Items that can't be compared; for example when
        another program has locked the file.</member>

        <member><inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="16" fileref="screenshots/aborted.png"
                         format="PNG" />
            </imageobject>
          </inlinemediaobject> Aborted item. WinMerge did not finish comparing
        this item when the compare was stopped. The result is unknown.</member>
      </simplelist>
    </section>

    <section>
      <title>Navigating the Folder Compare window</title>

      <indexterm>
        <primary>navigation functions</primary>

        <secondary>folder compare</secondary>
      </indexterm>

      <para>You can use the mouse as well as <link
      linkend="Shortcut_keys">keyboard</link> and context menu shortcuts to
      navigate the Folder Compare window. You can also use the toolbar buttons.
      For example, the <inlinemediaobject>
          <imageobject>
            <imagedata contentdepth="15" fileref="screenshots/nextdiff_btn.png" />
          </imageobject>

          <textobject>
            <phrase>Next Difference button</phrase>
          </textobject>
        </inlinemediaobject> <guimenuitem>Next Difference</guimenuitem> button
      finds the next different file or folder and selects it.</para>

      <note>
        <para>Unique files and folders are navigated in the same way as
        different ones.</para>
      </note>

      <para>You can select multiple files and folders. However, some operations
      (like <command>Rename</command>) are not available with multiple
      selections.</para>

      <para>Use the navigation buttons (<guibutton>Next Difference</guibutton>,
      <guibutton>Previous Difference</guibutton>, and so on) to step through
      differences in the compared files. Use WinMerge functions to merge
      contents by copying, moving, or delete one or more files or
      subfolders.</para>
    </section>
  </section>

  <section id="Compare_dirs_fileops">
    <title>File operations in Folder Compare<indexterm>
        <primary>file operations</primary>

        <secondary>in Folder Compare window</secondary>
      </indexterm><indexterm>
        <primary>Folder Compare window</primary>

        <secondary>file operations</secondary>
      </indexterm></title>

    <para>The Folder Compare window supports common operations on files, like
    editing, copying, deleting, moving, and renaming (moving is equivalent to a
    copy operation followed by a delete). You can use these file operations and
    some special WinMerge functions to merge the contents of folders. You can
    also open files using associated programs or external editors.</para>

    <para>The most convenient way to perform most of these tasks is to
    right-click one or more items and use the context menu, where all file
    operations are available.</para>

    <section>
      <title>Copying files<indexterm>
          <primary>copying files</primary>

          <secondary>in Folder Compare window</secondary>
        </indexterm></title>

      <para>The most common file operation in the Folder Compare window is
      copying files from side to side. There are several forms of the WinMerge
      copy function: all of them copy only files that are different, because
      copying identical files is of no use in merging. The copy functions are
      available in the context menu, in the WinMerge menu, and in the
      toolbar:</para>

      <section>
        <title>Context menu Copy shortcuts</title>

        <para>In the Folder Compare window's context menu, the
        <guimenuitem>Copy</guimenuitem> item has a submenu with four
        shortcuts:</para>

        <mediaobject>
          <imageobject>
            <imagedata contentwidth="526"
                       fileref="screenshots/ctx_menu_copy1.png" format="PNG" />
          </imageobject>

          <textobject>
            <phrase>Folder Compare window Copy context menu</phrase>
          </textobject>
        </mediaobject>

        <itemizedlist>
          <listitem>
            <para><guimenuitem>Left to Right</guimenuitem> and
            <guimenuitem>Right to Left</guimenuitem> copy the selection (or just
            the items in the selection that can be copied) from one side to the
            other. In the example, the suffix <guilabel>(2 of 4)</guilabel>
            indicates that only the two files that are different will be copied;
            the identical files will not. These shortcuts available only if any
            of the files you select is different: if you select only identical
            files, the shortcuts are unavailable.</para>
          </listitem>

          <listitem>
            <para><guimenuitem>Left to...</guimenuitem> and <guimenuitem>Right
            to...</guimenuitem> enable you to specify a copy target directory in
            your system, instead of a compared folder. When the Browse for
            Folder dialog opens, navigate to the target directory on your system
            (or create a new target folder) and click
            <guibutton>OK</guibutton>.</para>
          </listitem>
        </itemizedlist>
        <para>In the Folder Compare window with three folders, the
        <guimenuitem>Copy</guimenuitem> item has a submenu with nine
        shortcuts:</para>

        <mediaobject>
          <imageobject>
            <imagedata contentwidth="410"
                       fileref="screenshots/ctx_menu_copy2.png" format="PNG" />
          </imageobject>

          <textobject>
            <phrase>Folder Compare window Copy context menu</phrase>
          </textobject>
        </mediaobject>

      </section>

      <section>
        <title>Toolbar and menu Copy commands</title>

        <para>In the Folder Compare toolbar, <inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="17"
                         fileref="screenshots/copyr_button.png" />
            </imageobject>

            <textobject>
              <phrase>Copy Right button</phrase>
            </textobject>
          </inlinemediaobject> <guibutton>Copy Right</guibutton> and
        <inlinemediaobject>
            <imageobject>
              <imagedata contentwidth="17"
                         fileref="screenshots/copyl_button.png" />
            </imageobject>

            <textobject>
              <phrase>Copy Left button</phrase>
            </textobject>
          </inlinemediaobject> <guibutton>Copy Left</guibutton> accomplish the
        same task as the <guimenuitem>Left to Right</guimenuitem> and
        <guimenuitem>Right to Left</guimenuitem> context menu shortcuts: they
        copy from side to side only files that are valid to copy. However, these
        commands do not directly display the number of files to be copied;
        instead, they display a confirmation dialog where you can check a list
        of source and target file paths.</para>

        <para>In the WinMerge menu, <menuchoice>
            <guimenu>Merge</guimenu>

            <guimenuitem>Copy to Right</guimenuitem>
          </menuchoice> and <menuchoice>
            <guimenu>Merge</guimenu>

            <guimenuitem>Copy to Left</guimenuitem>
          </menuchoice> behave the same way as the toolbar Copy commands.</para>
      </section>
    </section>

    <section>
      <title>Deleting files<indexterm>
          <primary>deleting files</primary>

          <secondary>in Folder Compare window</secondary>
        </indexterm></title>

      <para>You can use the <guimenuitem>Delete</guimenuitem> context menu item
      to delete selected items in either or all sides. Like other file
      operations, <guimenuitem>Delete</guimenuitem> has a submenu with
      <guimenuitem>Left</guimenuitem>, <guimenuitem>Middle</guimenuitem>,
      <guimenuitem>Right</guimenuitem>, and <guimenuitem>All</guimenuitem>
      shortcuts.</para>

      <warning>
        <para>We highly recommend that you keep the <guilabel>Send deleted files
        into Recycle Bin</guilabel> option enabled See <xref
        linkend="Configuration" />), so that you can undo deletions in case of
        accidents. In addition, you should keep Recycle Bin enabled: the
        WinMerge option does not work if you disable the Recycle Bin in Windows.
        Again, you cannot undo file or folder deletion unless you use both the
        WinMerge <guilabel>Send deleted files into Recycle Bin</guilabel> option
        and the Windows Recycle Bin!</para>
      </warning>
    </section>

    <section>
      <title>Renaming files<indexterm>
          <primary>renaming files</primary>

          <secondary>in Folder Compare window</secondary>
        </indexterm></title>

      <para>To rename a file or folder, choose <guimenuitem>Rename</guimenuitem>
      in its context menu or press <keycap>F2</keycap>. Then change the name in
      the edit box and press <keycap>Enter</keycap>, or press
      <keycap>Esc</keycap> to cancel. You can only rename a single file or
      folder. Note that renaming changes items in both or all three sides: it is not
      currently possible to rename an item on just one side.</para>
    </section>

    <section>
      <title>Opening files<indexterm>
          <primary>opening files</primary>

          <secondary>in Folder Compare window</secondary>
        </indexterm></title>

      <para>In the context menu, you can use <guimenuitem>Open
      Left</guimenuitem>, <guimenuitem>Open Middle</guimenuitem> or
      <guimenuitem>Open Right</guimenuitem>, depending on which side you want to
      operate on. Each <guimenuitem>Open</guimenuitem> menu item has a submenu
      with these shortcuts:</para>

      <variablelist>
        <varlistentry>
          <term>With Registered Application</term>

          <listitem>
            <para>Opens the file with the application (if any) that is
            registered in Windows for the file's type.</para>

            <tip>
              <para>This shortcut usually opens a folder in a new Windows
              Explorer.</para>
            </tip>
            <para></para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>With External Editor</term>

          <listitem>
            <para>Opens the file with an external editor. The default editor is
            Notepad, but you can configure a different one in WinMerge
            options.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>With...</term>

          <listitem>
            <para>Opens the <guilabel>Open With</guilabel> dialog, where you can
            specify an application to open your file with.</para>
          </listitem>
        </varlistentry>
      </variablelist>
    </section>

    <section>
      <title>Copying pathnames or filenames<indexterm>
          <primary>pathnames</primary>

          <secondary>copying from Folder Compare window</secondary>
        </indexterm><indexterm>
          <primary>file names</primary>

          <secondary>copying from Folder Compare window</secondary>
        </indexterm></title>

      <para>The context menu <guimenuitem>Copy Pathname</guimenuitem> and
      <guimenuitem>Copy Filenames</guimenuitem> shortcuts copy the pathname or
      filename of selected items to the Windows clipboard. You can then paste
      the copied information into a file or application, for example to create a
      list of changed files or a change log.</para>

      <itemizedlist>
        <listitem>
          <para><guimenuitem>Copy Pathnames</guimenuitem> has a menu with three
          shortcuts, similar to other file operations. It copies the full
          pathnames of one or more selected items to the clipboard, one per
          line.</para>
        </listitem>

        <listitem>
          <para><guimenuitem>Copy Filenames</guimenuitem> copies only filenames
          without paths.</para>
        </listitem>
      </itemizedlist>
    </section>

    <section id="protectingfiles">
      <title>Protecting files<indexterm>
          <primary>Folder Compare window</primary>

          <secondary>protecting files in</secondary>
        </indexterm><indexterm>
          <primary>protecting files</primary>
        </indexterm><indexterm>
          <primary>read-only files</primary>

          <see>protecting files</see>
        </indexterm></title>

      <para>To protect the files and folders on either side of a compare from
      changes, enable the <menuchoice>
          <guimenu>File</guimenu>

          <guimenuitem>Left Read-only</guimenuitem>
        </menuchoice>, <menuchoice>
          <guimenu>File</guimenu>

          <guimenuitem>Middle Read-only</guimenuitem>
        </menuchoice> or <menuchoice>
          <guimenu>File</guimenu>

          <guimenuitem>Right Read-only</guimenuitem>
        </menuchoice> check box.</para>

      <important>
        <para>Setting the read-only option protects files and folders only in
        the current compare view; it does not affect their Windows file
        attributes.</para>
      </important>

      <para>This protected status is inherited by files that you open in the
      folder compare. For example, if you compare two folders, set one side
      read-only, and open two files for comparing, the open file on the
      protected side is write-protected. Similarly, you cannot copy a file from
      the unprotected side to the protected side.</para>

      <para>The <guilabel>RO</guilabel> code in the left side's, middle or right side's pane in
      the status bar (near the bottom right of the window) indicates that the
      side is currently read-only.</para>
    </section>

    <section>
      <title>Refreshing selected items in the view<indexterm>
          <primary>refreshing view</primary>
        </indexterm></title>

      <para>A full refresh of large folders can take a long time. In WinMerge
      2.2 and earlier, you always had to do a full refresh to update files after
      editing them outside WinMerge. Starting in Version 2.4, WinMerge can
      refresh just selected items: choose <guimenuitem>Refresh</guimenuitem>
      from the context menu or <menuchoice>
          <guimenu>View</guimenu>

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

    <section>
      <title>Archiving files<indexterm>
          <primary>archiving files</primary>

          <secondary>in Folder Compare window</secondary>
        </indexterm></title>

      <para>Use the context menu <guimenu>Zip</guimenu> menu item to create a
      new archive file containing the items you select.</para>

      <note>
        <para>Archive support requires that you have installed the WinMerge
        7-Zip plugin.</para>
      </note>

      <para>The <guimenu>Zip</guimenu> menu item has a submenu with five shortcuts:</para>

      <variablelist>
        <varlistentry>
          <term>Left</term>

          <listitem>
            <para>Adds left-side files and folders recursively to the archive
            file</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Middle</term>

          <listitem>
            <para>Adds middle files and folders recursively to the archive
            file</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Right</term>

          <listitem>
            <para>Adds right-side files and folders recursively to the archive
            file</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Both</term>

          <listitem>
            <para>Adds files and folders recursively from both sides to the
            archive file. Because the filenames are same, they are added to
            different subfolders, named <filename
            class="directory">Original</filename> and <filename
            class="directory">Altered</filename>, inside the archive: left-side
            files are put to <filename class="directory">Original</filename>,
            and right-side files are put into <filename
            class="directory">Altered</filename>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>All</term>

          <listitem>
            <para>Adds files and folders recursively from all sides to the
            archive file. Because the filenames are same, they are added to
            different subfolders, named <filename
            class="directory">Original</filename> and <filename
            class="directory">Altered</filename>, inside the archive: left-side
            files are put to <filename class="directory">Original</filename>,
            and right-side files are put into <filename
            class="directory">Altered</filename>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Differences</term>

          <listitem>
            <para>Like <guimenuitem>Both</guimenuitem>, but adds only different
            files (including unique files) from both sides.</para>
          </listitem>
        </varlistentry>
      </variablelist>

      <para>When you select one of the <guimenu>Zip</guimenu> shortcuts, the
      Save As dialog prompts you for the archive filename and type. WinMerge
      cannot add files to existing archive files: it always creates a new
      archive file.</para>

      <!--Original:
WinMerge looks for subfolders Original/ and Altered/ in archive files. If archive file contains these 
subfolders and same filename is given to both sides WinMerge compares contents of those two folders.
 
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. 
-->

      <tip>
        <para>WinMerge can compare the contents of archive files that have the
        same name on both sides: WinMerge looks for the <filename
        class="directory">Original</filename> and <filename
        class="directory">Altered</filename> subfolders, and compares the
        contents of those two folders.</para>
      </tip>

      <para>If a folder compare includes the contents of an archive file, any
      changes made to the included files in WinMerge (for example, using an
      <guimenuitem>Open</guimenuitem> file operation to edit the file) are saved
      in the archive file. But you cannot update archive contents by using the
      WinMerge <guimenuitem>Copy</guimenuitem>, <guimenuitem>Move</guimenuitem>,
      or <guimenuitem>Delete</guimenuitem> file operations. Instead, create a
      new archive file using one of the <guimenuitem>Zip</guimenuitem>
      shortcuts.</para>
    </section>
  </section>

  <section id="Compare_dirs_browsing">
    <title>Browsing folders in the Folder Compare window<indexterm>
        <primary>folders</primary>

        <secondary>browsing in Folder Compare window</secondary>
      </indexterm></title>

    <para>This section discusses ways to browse folders that are listed in a
    Folder Compare window. When you browse a folder, you perform a completely
    new compare operation. Its result overwrites the current result in the
    window.</para>

    <section>
      <title>Browsing folders in a nonrecursive compare</title>

      <para>Even though a nonrecursive folder compare does not include the
      contents of subfolders, the subfolders themselves are listed as files in
      the result. Similarly, the compared folder's parent folder is listed as a
      file at the top of the table. By opening these folders directly in the
      Folder Compare window, you can selectively browse a directory tree. This
      approach — comparing just the subdirectories you are interested in — can
      be more efficient than performing a recursive compare on the entire
      directory tree.</para>

      <variablelist>
        <varlistentry>
          <term>Browsing the parent folder</term>

          <listitem>
            <para>To compare the <inlinemediaobject>
                <imageobject>
                  <imagedata fileref="screenshots/folderup.png" format="PNG" />
                </imageobject>
              </inlinemediaobject> parent folder (the <guilabel>..</guilabel>
            path at the top), double-click its row, or select the row and press
            <keycap>Enter</keycap>.</para>

            <para>Sometimes the parent folder cannot be opened (for example if
            you do not have permissions to access it). These two icons indicate
            whether a 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>
          </listitem>
        </varlistentry>
      </variablelist>

      <variablelist>
        <varlistentry>
          <term>Browsing a single subfolder that exists on both or all three
          sides</term>

          <listitem>
            <para>To compare a single subfolder that exists on both or all three
            sides, double-click the folder in the folder compare window.</para>
          </listitem>
        </varlistentry>
      </variablelist>

      <variablelist>
        <varlistentry>
          <term>Browsing a single subfolder that exists only one side</term>

          <listitem>
            <para>If you browse to a subfolder that exists only one side,
            WinMerge can create a new, matching folder on the other side
            respective both other sides. See
           <xref linkend="CompareDirs_browse_unique" /> for details.</para>
          </listitem>
        </varlistentry>
      </variablelist>

      <variablelist>
        <varlistentry>
          <term>Browsing two different subfolders</term>

          <listitem>
            <para>You cannot compare two subfolders (that is, selecting two
            rows) where the subfolders on each side are different. Only if you
            have previously compared identical folders (for example, by browsing
            a single subfolder in a compare result) can you compare two
            subfolders. First select the two folders in the Folder Compare
            window, as shown in the following figure:</para>

            <mediaobject>
              <imageobject>
                <imagedata contentwidth="572"
                           fileref="screenshots/foldercomp_2same.png"
                           format="PNG" />
              </imageobject>

              <textobject>
                <phrase>Folder Compare window, two folders selected</phrase>
              </textobject>
            </mediaobject>
            <para></para>

            <para>The order of selection is significant: the folder you select
            first is the left folder in the result; the second selected folder
            becomes the right folder in the result.</para>

            <para>With the two folders selected, right-click and choose
            <guimenuitem>Compare</guimenuitem> (or click <menuchoice>
                <guimenu>Merge</guimenu>

                <guimenuitem>Compare</guimenuitem>
              </menuchoice> in the menu).</para>

            <tip>
              <para>Again, the <guimenuitem>Compare</guimenuitem> operation is
              available only when the current left and right folder paths are
              identical in the Folder Compare window, as shown in the preceding
              screenshot. For example, it is not available if the current
              window compares two different folders.</para>
            </tip>
          </listitem>
        </varlistentry>
      </variablelist>
    </section>

    <section id="CompareDirs_browse_unique">
      <title>Browsing unique folders<indexterm>
          <primary>unique folders</primary>

          <secondary>comparing</secondary>
        </indexterm></title>

      <para>In WinMerge 2.6 and earlier, you could not browse to unique folders
      (folders that exist only in one side of a compare result), because
      WinMerge cannot compare an existing folder to a non-existing folder. To
      copy anything from a unique folder in WinMerge, you had to first create a
      copy of the entire folder structure.</para>

      <para>However, you might prefer not to copy the whole folder structure.
      Starting in Version 2.8, WinMerge provides an alternate way to create a
      new, empty folder instead. This enables you to copy just the elements you
      want from the original, unique folder to the created empty folder. This
      procedure demonstrates:</para>

      <orderedlist>
        <listitem>
          <para>Browse to the unique folder (select the folder and press
          <keycap>Enter,</keycap> double-click it, or right-click it and choose
          <guimenuitem>Compare</guimenuitem>). For example:</para>

          <mediaobject>
            <imageobject>
              <imagedata contentwidth="590"
                         fileref="screenshots/foldercmp_unique1.png"
                         format="PNG" />
            </imageobject>

            <textobject>
              <phrase>Folder Compare window, comparing unique folder</phrase>
            </textobject>
          </mediaobject>

          <para>A WinMerge message informs you that the folder exists on only
          one side and cannot be opened. The message then prompts you to confirm
          whether you want to create a matching folder and open it as the other
          side of the compare result.</para>
        </listitem>

        <listitem>
          <para>Click <guibutton>Yes</guibutton> to confirm
          (<guibutton>No</guibutton> cancels the compare). In the new compare
          result, the unique folder is opened on the left side, and the new
          empty created folder is on the right:</para>

          <mediaobject>
            <imageobject>
              <imagedata contentwidth="590"
                         fileref="screenshots/foldercmp_unique2.png"
                         format="PNG" />
            </imageobject>

            <textobject>
              <phrase>Folder Compare window after browsing to unique and created
              folders</phrase>
            </textobject>
          </mediaobject>

          <para>In the compare result, you can copy or move items (for example,
          using the right-click context menu) from the unique folder to the
          created folder.</para>
        </listitem>
      </orderedlist>
    </section>
  </section>

  <section id="Compare_dirs_customizing">
    <title>Customizing the Folder Compare window<indexterm>
        <primary>Folder Compare window</primary>

        <secondary>customizing</secondary>
      </indexterm></title>

    <para>This section describes how to control the way Folder Compare window
    displays results. You can customize the view by showing, hiding, and
    reordering the table columns.</para>

    <section>
      <title>Showing and hiding types of files<indexterm>
          <primary>View menu</primary>

          <secondary>Folder Compare window</secondary>
        </indexterm></title>

      <para>The <guimenu>View</guimenu> menu contains these shortcuts to show or
      hide types of items. Enable (check) a menu option to show the item;
      disable it to hide the item.</para>

      <itemizedlist>
        <listitem>
          <para><guimenuitem>Show Identical Items</guimenuitem>: Files detected
          as identical</para>
        </listitem>

        <listitem>
          <para><guimenuitem>Show Different Items</guimenuitem>: Files detected
          as different</para>
        </listitem>

        <listitem>
          <para><guimenuitem>Show Left Unique Items</guimenuitem>: Files and
          directories present only in left side</para>
        </listitem>

        <listitem>
          <para><guimenuitem>Show Middle Unique Items</guimenuitem>: Files and
          directories present only in the middle</para>
        </listitem>

        <listitem>
          <para><guimenuitem>Show Right Unique Items</guimenuitem>: Files and
          directories present only in right side</para>
        </listitem>

        <listitem>
          <para><guimenuitem>Show Skipped Items</guimenuitem>: Files and
          directories omitted by file filters</para>
        </listitem>

        <listitem>
          <para><guimenuitem>Show Binary Files</guimenuitem>: Files detected as
          binaries</para>
        </listitem>
      </itemizedlist>
    </section>

    <section>
      <title>Changing column sorting</title>

      <para>The rows in the Folder Compare window are ordered according to the
      sort order of a particular column. This sort column is indicated by a
      small arrow in its heading. The arrow points up if the column is sorted in
      ascending order, down if descending. The Folder Compare example at the top
      of this topic is sorted by the Filename column, in ascending order.</para>

      <para>To choose another order column, simply click in that column's
      heading. The selected column is set to its default sort order and all the
      rows are reordered by that column's sort order.</para>

      <para>To change the sort direction of a column that is already the sort
      column, click in its header again. That is, clicking in a sort column
      header reverses its order (toggling between ascending and descending
      order).</para>
    </section>

    <section>
      <title>Adding, removing, and reordering columns</title>

      <para>To modify the columns that are displayed in the Folder Compare
      window:</para>

      <orderedlist>
        <listitem>
          <para>Right-click any column heading and choose <guimenuitem>Customize
          Columns</guimenuitem>. Or, click <menuchoice>
              <guimenu>Tools</guimenu>

              <guimenuitem>Customize Columns</guimenuitem>
            </menuchoice></para>
        </listitem>

        <listitem>
          <para>The Display Columns dialog contains a list of all the available
          column names, each with a check box. Configure the columns using any
          combination of these actions:</para>

          <itemizedlist>
            <listitem>
              <para>Check the columns you want to display (note that selecting
              the item in the list is not enough)</para>
            </listitem>

            <listitem>
              <para>Uncheck the columns you want to hide.</para>
            </listitem>

            <listitem>
              <para>To change the order of columns, select one or more items and
              click <guibutton>Move Up</guibutton> or <guibutton>Move
              Down</guibutton>.</para>
            </listitem>

            <listitem>
              <para>Click <guibutton>Defaults</guibutton> if you want to restore
              the default WinMerge column configuration, overriding your custom
              configuration.</para>
            </listitem>
          </itemizedlist>
        </listitem>

        <listitem>
          <para>Click <guibutton>OK</guibutton>.</para>
        </listitem>
      </orderedlist>

      <para><indexterm>
          <primary>Display Columns dialog</primary>
        </indexterm>The following columns in the Display Columns dialog are
      displayed by default in the Folder Compare window:</para>

      <itemizedlist>
        <listitem>
          <para><guilabel>Filename</guilabel>: Name of compared item.
          In a nonrecursive compare, this column includes both files and
          folders; in a recursive compare, it does not include folders: instead,
          folders are listed in the Folder column.</para>
        </listitem>

        <listitem>
          <para><guilabel>Folder</guilabel>: Path of compared subfolder,
          relative to the compared folder. For a nonrecursive compare this
          column is always empty: folders are listed in the
          <guilabel>Filename</guilabel> column instead.</para>
        </listitem>

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

        <listitem>
          <para><guilabel>Left Date</guilabel>, <guilabel>Middle
          Date</guilabel>, <guilabel>Right Date</guilabel>: Modification dates
          of item in each side. The newer of the two dates (or the date for any
          unique item) is prefixed with an asterisk ( * ).</para>
        </listitem>

        <listitem>
          <para><guilabel>Extension</guilabel>: File extension, handy for
          sorting.</para>
        </listitem>
      </itemizedlist>

      <para>The following additional columns are available in the Display
      Columns dialog:</para>

      <itemizedlist>
        <listitem>
          <para><guilabel>Short Result</guilabel>: Displays the
          <guilabel>Comparison Result</guilabel> column in a brief (Right only)
          form.</para>
        </listitem>

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

        <listitem>
          <para><guilabel>Left Attributes</guilabel>, <guilabel>Middle
          Attributes</guilabel>, <guilabel>Right Attributes</guilabel>: Shows
          file attributes.</para>
        </listitem>

        <listitem>
          <para><guilabel>Left Creation Time</guilabel>, <guilabel>Middle
          Creation Time</guilabel>, <guilabel>Right Creation Time</guilabel>:
          Item creation time.</para>
        </listitem>

        <listitem>
          <para><guilabel>Left Encoding</guilabel>, <guilabel>Middle
          Encoding</guilabel>, <guilabel>Right Encoding</guilabel>: File
          encoding. Shows the codepage number for ANSI files and Unicode
          encoding for Unicode files.</para>
        </listitem>

        <listitem>
          <para><guilabel>Left File Version</guilabel>, <guilabel>Middle File
          Version</guilabel>, <guilabel>Right File Version</guilabel>: Version
          number from the file, if present. Note that the version is read only
          for some binary file types known to usually have a version
          resource.</para>
        </listitem>

        <listitem>
          <para><guilabel>Left Size</guilabel>, <guilabel>Middle
          Size</guilabel>, <guilabel>Right Size</guilabel>: File size in
          bytes.</para>
        </listitem>

        <listitem>
          <para><guilabel>Left Size (Short)</guilabel>, <guilabel>Middle Size
          (Short)</guilabel>, <guilabel>Right Size (Short)</guilabel>: Shorter
          versions of file sizes, rounded to KB, MB, or GB.</para>
        </listitem>

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

        <listitem>
          <para><guilabel>Differences</guilabel>: Number of differences found
          between files, excluding possibly ignored differences.</para>
        </listitem>

        <listitem>
          <para><guilabel>Ignored Diff</guilabel>: Number of ignored differences
          within files. These are differences ignored by line filters.</para>
        </listitem>

        <listitem>
          <para><guilabel>Left EOL</guilabel>, <guilabel>Middle EOL</guilabel>,
          <guilabel>Right EOL</guilabel>: Shows the EOL (linefeed) style of
          files.</para>
        </listitem>
      </itemizedlist>
    </section>

    <section>
      <title>Hiding items</title>

      <para>You can quickly hide one or more selected items by using the
      <guimenuitem>Hide Items</guimenuitem> context menu shortcut. The items
      remain hidden until you refresh the view (press <keycap>F5</keycap>) or
      click <menuchoice>
          <guimenu>View</guimenu>

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

      <tip>
        <para>Get to know <guimenuitem>Hide Items</guimenuitem>: it can save you
        a lot of time by eliminating items that you already handled, or that are
        not currently of interest, from the view. For example, you might hide
        files after merging them, making it easier to see what items are left to
        merge.</para>
      </tip>
    </section>
  </section>

  <section id="CompareDirs_winshell">
    <title>Using Windows shell commands from the Folder Compare window</title>

    <para>You can right-click a selection in the
    Folder Compare window and launch Windows shell commands directly from the
    context menu.</para>

    <para>If the selection occurs on both sides, you can choose either the
    <guimenu>Left Shell Menu</guimenu> or <guimenu>Right Shell Menu</guimenu>.
    If the selection occurs on all sides, you can choose the
    <guimenu>Left Shell Menu</guimenu>, <guimenu>Middle Shell Menu</guimenu> or
    <guimenu>Right Shell Menu</guimenu>. If the item occurs only on one side,
    only that side's shell menu is available.</para>

    <caution>
      <para>Please consider that shell menu commands run entirely outside of
      WinMerge. Consequently, WinMerge might not respond to some operations in
      the same way as operations performed inside WinMerge. For example, if you
      delete a file through this integration instead of using the WinMerge
      <command>Delete</command> command, the change is not automatically shown
      in the Folder Compare window (you have to manually refresh the window to
      see the change).</para>
    </caution>
  </section>
  <para></para>
</article>
