What's the best way to use Folder Sync?

While looking through the forum I noticed that some people mention Folder Sync, but I never understood how to use it.

Would it be too much to ask for a tutorial?

Well, you could read Section 14.3 in the manual.

It’s intended to facilitate sharing material between a Scrivener project and a third-party application. If you don’t need to do that, then you don’t need the feature.

I do wish I could do Markdown directly in Scrivener, too, and had a look at folder sync because I’ve heard people mention you can use Folder Sync to add markdown docs to Scrivener.

Here are my notes for syncing an external folder with markdown, primarily for Obsidian:

  • In a synced Obsidian vault, create new project folder called Test.

  • Inside Test, create a folder for the markdown to go, called Markdown.

  • Still inside Test, create a folder for the Scrivener project to live, called Scrivener.

  • Open Scrivener app and create a new project, saving it inside Test/Scrivener, called TestProject.

  • In TestProject, delete anything inside Draft, then set up the external folder sync option to Test/Markdown. This maps Scrivener’s Draft folder to Test/Markdown from now on.

  • Sync the external folder.

  • In scrivener, creating any file inside Draft now creates it as a markdown file in Test/Markdown/Draft. Because they’re markdown files, they can be opened in any markdown editor, not just Scrivener.

  • All syncing is handled by Obsidian.

  • The fly in the ointment is that Scrivener iOS doesn’t support external folders, so only the markdown editing is possible with a markdown editor.

3 Likes

What does that mean exactly? I thought Scrivener handles the syncing (I’m on Windows, not iOS).

Here are a few links to posts on how I do this:

  • Integrating Scrivener with a Markdown editor: in this case I am showing Sublime Text on the right side of the screenshot. But any editor or “vault” type program would work equally well here. You can see how the Scrivener project window can be simplified down to an outliner, so that it does what it does best. I throw a shortcut on the “sync now” menu command, so I can periodically keep both programs on the same page. I.e. this approach needn’t be a back-and-forth affair, you can bring two programs to bear on the same work at once.
  • Using Obsidian and Scrivener together: the link to Sublime in this post is not the same as above, but it is pretty specific to optimising Sublime usage, with its project folder capabilities.

And note how the forum collections back-links to posts, below them. This post will become one of those back-links, but you may find some other interesting discussions in there, coming from different angles. But I don’t think there is anything where I’ve really spelled out the settings, in a “tutorial” format, so here’s a go at that.

Scrivener setup

As for sync settings, most are up to taste, but the exceptions would be:

  • Prefix file names with numbers: while ordinarily this is a nice setting because it keeps things in binder order (and that can be super helpful you have a lot of similar binder titles), if you intend to really get into Obsidian as well, it might work against you because of how the number becomes part of the link name. Change the order of things in the binder, sync, and the numbers change, breaking the links.
  • Take snapshots of affected documents before updating: off by default, I almost always turn this on. It gives you a record of what has changed, and the ability to diff the changes in the Inspector sidebar, with the Compare button. This setting can lead to bloat though, so using it may require periodically cleaning old snapshots.[1] Alternatively, if you use Git as well, I’d leave this off as that will be a dramatic improvement over snapshots on the whole.
  • And of course, for file formats you definitely want plain-text and the extension set to “.md”, with Automatically convert plain text paragraph spacing disabled. That setting is only of use to rich text users who use Markdown on the go. It can and will damage Markdown in the editor in some cases (YAML metadata blocks, tables, definition lists, anything else that would not like an empty line between elements).
  • For speedier syncing, the menu command to put a shortcut on is File â–¸ Sync â–¸ with External Folder Now.[2]
  • Lastly, not in the sync folder setup itself, but rather as a global preference, there is the Convert text inside (( )) and {{ }} to inline notes when syncing plain text files, in the Sharing: Sync options tab. You will want to use inline annotations and footnotes primarily, for this workflow, as this setting will preserve them. Inspector notes, as a kind of formatting, can get lost in the plain text round-trip.

Obsidian setup and usage

  • Create the vault at the sync folder top level, particularly if you intend to sync the entire draft, and not just the draft folder. Obsidian’s hidden files, where settings and indexing are stored, will not interfere with Scrivener. It is designed to ignore hidden files (Git would also use hidden files to help manage itself).

  • I don’t know if this is still necessary, it may be worth a check, but in the past it has been noted that Scrivener’s file naming convention—where it uses square brackets to indicate the internal ID number of a binder item—would break Obsidian’s wikilink format. The way around that is to go into this vault’s settings, under “Files and links”, and disable Use [[Wikilinks]]. You still type them in the same way, but the result will look like a standard Markdown link instead, such as, [Linking with Scrivener and Obsidian [21]](Linking%20with%20Scrivener%20and%20Obsidian%20[21].md). Obviously, that doesn’t look as nice in source editing mode, but it gets the job done. (And again, do test, they may have fixed this by now.)

    Of course these links are meaningless outside of this integration, so whether to use them at all is another matter. If you are actually using Obsidian to help draft what will be Scrivener’s Markdown source for compiling, then you wouldn’t want to use its internal linking at all. Instead you want to use the MultiMarkdown/Pandoc convention for cross-referencing between sections by name, and simply type in [Linking with Scrivener and Obsidian]. These conversion engines will create the internal wiring necessary, depending on the output format, and turn it into a function cross-reference link for you.

  • Going back to the inline annotation conversion setting in Scrivener, if you do want to make use of Obsidian tags, then consider typing them in like so: (( #tag1 #tag2 )). This will enclose them in an inline annotation when they sync back into Scrivener, keeping them out of the compiled output by default. And of course since all of this as fundamentally text, you can add your own tags from the Scrivener side, too.


  1. Refer to §15.8.4, The Snapshots Manager, specifically the subsection on Deleting Snapshots with the Manager, and the following subsection on automatically created snapshots. They will use a naming convention you can search by and then selectively nuke, perodicially. ↩︎

  2. Refer to Appendix A.1 in the user manual PDF for platform-specific instructions. ↩︎

1 Like

As I said, this is taken from my notes so maybe that line isn’t appropriate for your use case. I am using Obsidian sync service

1 Like

Oh, I see.

I use the free Obsidian.