FreeFileSync Open Source File Synchronization

About Tutorials Screenshots Vision Download Archive Forum F.A.Q. Manual Donate
It looks like an ad blocker has blocked the ads. Donate now The FreeFileSync project is 100% dependent on ad revenue and donations to stay alive. Instead of the ads, and after FreeFileSync has proven useful to you, please think about supporting with a donation.
FreeFileSync User Manual:

External Applications

By default, when you double-click a row in the main dialog, FreeFileSync opens the operating system's file browser:
Windows:explorer.exe /select, %local_path% & exit 0
macOS: open -R %local_path%
Linux: xdg-open "$(dirname %local_path%)"
To customize this behavior or integrate other external applications into FreeFileSync, go to Menu → Tools → Options → Customize context menu and add or replace a command.

You can quickly access all entries by pressing the corresponding numeric keys 0–9 or through the context menu (right-click). The first entry can also be executed by double-clicking on an item.

In addition to regular macros, the following special macros are available:
Macro Description
%item_path%
Full file or folder path
%local_path%
Creates a temporary local copy for files on SFTP and MTP storage. Otherwise identical to %item_path% for local files and network shares.
%item_name%
File or folder name
%parent_path%
Parent folder path

  • To refer to the item on the opposite side, append "2" to the macro name:
    %item_path2%, %local_path2%, %item_name2%, %parent_path2%.
  • To generate a list of all selected items (separated by space), append "s" to the macro name:
    %item_paths%, %local_paths%, %item_names%, %parent_paths%.

Examples:

  • Launch a file content comparison tool: Windows: WinMerge
    "C:\Program Files (x86)\WinMerge\WinMergeU.exe" %local_path% %local_path2%

    macOS: opendiff (requires Xcode)
    opendiff %local_path% %local_path2%

    Ubuntu: kompare (sudo apt install kompare)
    kompare %local_path% %local_path2%

  • Show file in Windows Explorer:
    explorer.exe /select, %local_path% & exit 0
    Note
    Explorer.exe doesn't set an exit code, but FreeFileSync will show an error message if it doesn't find exit code = 0 ("Success"). To mitigate, append (&) command exit 0 to set the exit code explicitly.

  • Open command prompt for the selected item:
    start cmd.exe /k cd /D %parent_path%
    Note
    Since FreeFileSync doesn't automatically show a console window, start is used to open one. cmd.exe /k runs the following command without immediately exiting the console. cd navigates to the directory, even if it's on a different volume (/D).

  • Copy the item path to the clipboard (alternative to using CTRL + C)
    echo %item_path%| clip

  • Write the list of selected file paths to a text file:
    echo %item_path% >> %csidl_Desktop%\file_list.txt

  • Preview files using Quick Look on macOS:
    qlmanage -p %local_path%

  • Pass a list of selected files to a script as command line arguments:
    C:\my-script.cmd %local_paths%