All projects

BCSessionSync

Syncs up Beyond Compare session settings based on keywords (groups).

A simple console application that synchronizes Beyond Compare session settings across multiple sessions in the same sync group.

Overview

This tool monitors your BCSessions.xml file and automatically synchronizes session properties (Filters, Rules, State) between all sessions that share a common sync keyword in their name.

Installation

  1. Navigate to the project directory:

    cd C:\Users\kodyb\WasatchWizard\BCSessionSync
  2. Restore dependencies and build:

    dotnet restore
    dotnet build
  3. Run manually (one-time sync):

    dotnet run --no-build
  4. Or publish for standalone use:

    dotnet publish -c Release -r win-x64 --self-contained true -o ./publish/win-x64

Usage

One-Time Sync (Default)

Run the app to perform a single sync operation and exit:

cd C:\Users\kodyb\WasatchWizard\BCSessionSync
dotnet run --no-build

The app will:

  1. Load settings from backup-settings.yaml
  2. Scan all sessions in BCSessions.xml
  3. Synchronize groups where timestamps differ
  4. Exit automatically

Continuous Monitoring Mode

Run the app to monitor BCSessions.xml for changes and sync automatically:

cd C:\Users\kodyb\WasatchWizard\BCSessionSync
dotnet run --no-build --monitor

The app will:

  1. Start monitoring BCSessions.xml in real-time
  2. Sync all groups whenever a change is detected (after 3-second debounce)
  3. Handle file locks gracefully (retries if Beyond Compare has the file open)
  4. Wait for you to press Enter or Ctrl+C to exit

Configuration

Edit backup-settings.yaml to define your sync groups:

sync_groups:
  - keyword: '[~]'
    name: 'User Profile Sync'
    
  - keyword: '[scoop]'
    name: 'Scoop Sync'
    
  - keyword: '[comp]'
    name: 'Computer Sync'

bc_sessions_file: 'C:\Users\kodyb\AppData\Roaming\Scooter Software\Beyond Compare 5\BCSessions.xml'

Session Naming Convention

Sessions should include the sync keyword anywhere in their name. Examples:

All sessions containing the same keyword will be synchronized together.

How It Works

Sync Logic

For each sync group:

  1. If only 1 session exists → Skip (nothing to sync with)
  2. If all timestamps match → Skip (no changes detected)
  3. If timestamps differ → Use newest as source, update all others

Properties synchronized:

Real-Time Monitoring

When monitoring mode is enabled (--monitor):

  1. FileSystemWatcher monitors BCSessions.xml for changes
  2. On change detected → debounce timer starts (3 seconds)
  3. After 3 seconds of no activity:
    • If file locked by Beyond Compare → wait 2 more seconds and retry
    • If unlocked → perform sync automatically

Logging

All operations are logged to logs/sync_YYYYMMDD.log:

[2026-03-02 17:45:23.456] [INFO] Started monitoring: C:\Users\kodyb\AppData\Roaming\Scooter Software\Beyond Compare 5\BCSessions.xml
[2026-03-02 17:45:23.456] [INFO] Synced: 'Personal 1TB (userprofile_sync) (personal_1t)' <- 'Nomad (userprofile_sync) (nomad_4tb)'

Troubleshooting

"BCSessions.xml not found"

"Need at least 2 sessions to sync"

"All timestamps match. No sync needed."

File Locked Error (in monitoring mode)

Future Enhancements (v2)

License

This tool is provided as-is for personal use. Beyond Compare is a commercial product by Scooter Software.