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.
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:
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 implements selective sync by placing ‘selected’ files and folders in .stignore (more details here). 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.