# Idea: Workaround for Selective Sync

**URL:** https://forum.syncthing.net/t/idea-workaround-for-selective-sync/24192
**Category:** General
**Created:** [April 16, 2025, 5:48pm UTC](https://forum.syncthing.net/t/idea-workaround-for-selective-sync/24192 "2025-04-16T17:48:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chaos](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@chaos](https://forum.syncthing.net/u/chaos)
#### Post date: [April 16, 2025, 5:48pm UTC](https://forum.syncthing.net/t/idea-workaround-for-selective-sync/24192/1 "2025-04-16T17:48:39Z")

</div>

A number of people have asked for a selective sync feature. Here’s how one could accomplish this with Syncthing as it stands today.

Let us posit a cluster of two Devices, A and B, with the user wanting to selectively sync files from A to B.

On A, do the following:

- Create the appropriate ignore patterns in a separate file, such as `selective-stignore.txt` and use `#include selective-stignore.txt` as the Ignore Pattern for that Folder. Make sure that the file is synced between A and B.
- Use Task Scheduler on Windows, Automator on Mac or `cron` to create a text file with the exact file names and paths of those files you might want to selectively sync. Make sure this file (perhaps `selective-dir.txt`) is deleted and re-created on a schedule that works for your needs. With a little effort, you could make sure that this file showed the relative locations of files to the root of the Syncthing Folder. Make sure this file is is synced between A and B.

Now, if you need a file on B that isn’t currently synced, you can find the filename in the `selective-dir.txt` file, and add it with a preceding `!` to the `selective-ignore.txt` file that is synced between A and B.

Easy? If you’re comfortable with scripting and the command line, sure.

Easy for less technical users? No.

Graphical? No.

A fever dream on my part? Possibly.

Constructive feedback most welcome.

---

<div class="post-metadata">

### Author: ![pixelspark](https://forum.syncthing.net/user_avatar/forum.syncthing.net/pixelspark/32/15749_2.png) [@pixelspark](https://forum.syncthing.net/u/pixelspark)
#### Post date: [April 17, 2025, 7:37am UTC](https://forum.syncthing.net/t/idea-workaround-for-selective-sync/24192/2 "2025-04-17T07:37:13Z")

</div>

You are definitely not the first asking for this feature - there are various posts on this forum discussing possible implementations and their up- and downsides. See e.g. this thread:

> [@Selective Sync Feature(most important)](https://forum.syncthing.net/t/selective-sync-feature-most-important/16394):
>
> Hey there, Syncthing Team, thanks for providing this wonderful app. this app is wonderful but all the time i keep feeling the need of a feature - Selective sync this feature should be your top priority because everything is going fine. Rsilio Sync has this feature but that app is slow in working and not constant like syncthing. Sometimes i Need to share my hard drive data through syncthing. I don’t want all the data , i need different files from different different folder. So now if i share…

The take-away is (imo) that it is very hard to implement selective sync in Syncthing that works for everone in a safe and reliable manner (i.e. that doesn’t eat files and doesn’t confuse the user about what is actually stored where). Schemes based around `.stignore` in particualr have various edge cases (i.e. what happens when files are renamed or deleted? how do you deal with new files inside ‘selected’ folders?)

The [Synctrain iOS/macOS-app](https://forum.syncthing.net/t/synctrain-1-9-ios-macos/24190) implements selective sync by placing ‘selected’ files and folders in `.stignore` (more details [here](https://github.com/pixelspark/sushitrain/blob/main/README.md#selective-synchronisation)). This works reasonably well, but really, really depends on proper support from the user interface (which actually prevents certain scenarios, such as selecting files inside an already selected folder, warns the user when deselecting a file that is not present on other peers or when that cannot be verified, alerting the user in various ways when there are new files, integration with other features such as drag/drop and photo sync, etc.). So it is possible, but (as far as I understand) unlikely to make its way into Syncthing core.

---

<div class="post-metadata">

### Author: ![chaos](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@chaos](https://forum.syncthing.net/u/chaos)
#### Post date: [April 17, 2025, 10:37am UTC](https://forum.syncthing.net/t/idea-workaround-for-selective-sync/24192/3 "2025-04-17T10:37:12Z")

</div>

Oh, the workaround isn’t for **me**. And very well said sir.
