Screwdriver exports files from inside your vault into a Markdown note, and restores those files from that note later.
It is useful for moving or synchronising files that normal Markdown synchronisation workflows may not handle well, such as plug-in files, theme files, CSS snippets, or hidden files under .obsidian.
Since v0.0.7, Screwdriver can be controlled from note properties.
- Export files from selected folders into the current note.
- Fetch remote files into the current note.
- Restore exported files back into your vault.
- Filter or ignore files while exporting.
- Restore files under hidden folders such as
.obsidian.
Important
Screwdriver stores exported files inside a Markdown note. The note can become very large. Consider excluding Screwdriver notes from plug-ins that scan Markdown content heavily, such as Templater or Dataview.
You can install Screwdriver in either of these ways:
- From Community Plugins
- Via BRAT
Use these commands from the command palette:
Screwdriver: Create local export noteScrewdriver: Add folder to this export noteScrewdriver: Export files into this note- On another device or vault, run
Screwdriver: Restore files from this note
The first command creates the required properties on the active note. The second command adds a folder to the targets property. The third command reads those properties and embeds the matching files into the note body.
A Screwdriver note for local exports uses properties like this:
targets:
- .obsidian/plugins/tagfolder
urls: []
ignores:
- /node_modules
- /.git
filters:
- main\.js$
- manifest\.json$
- styles\.css$
comment: "Use 'Add folder to this export note' to add targets"
tags: []
adjustObsidianDir: true
skipNewFile: false
skipOldFile: falseYou usually do not need to write this by hand. Run Screwdriver: Create local export note on an empty note, then run Screwdriver: Add folder to this export note.
When you choose a plug-in or theme folder, Screwdriver adds common filters automatically:
- Plug-ins:
main.js,manifest.json,styles.css - Themes:
manifest.json,theme.css - CSS snippets: selected
.cssfiles
You can edit these properties manually if needed:
targets: folders to export fromurls: remote files to fetchignores: paths to skip while exportingfilters: regular expressions for files to includeadjustObsidianDir: store the Obsidian config folder as.obsidianso the note can be restored across vaultsskipNewFile: do not overwrite an existing file with a newer exported copyskipOldFile: do not overwrite an existing file with an older exported copy
To export several folders into the same note, run Screwdriver: Add folder to this export note more than once.
To create a note for remote files, run:
Screwdriver: Create remote fetch note
Then add URLs to the urls property and run:
Screwdriver: Export files into this note
This is useful for storing CSS snippets or other small text assets from remote sources.
Run:
Screwdriver: Export files into this note
Screwdriver keeps the note properties and appends exported files to the note body.
Example output:
---
targets:
- .obsidian/plugins/tagfolder
urls: []
ignores:
- /node_modules
- /.git
filters:
- main\.js$
- manifest\.json$
- styles\.css$
comment: "Use 'Add folder to this export note' to add targets"
tags: []
adjustObsidianDir: true
skipNewFile: false
skipOldFile: false
---
# .obsidian/plugins/tagfolder/main.js
- Created :2023/7/12 9:28:27
- Modified:2023/8/25 17:52:29
```screwdriver:.obsidian/plugins/tagfolder/main.js:plain:1692953549000
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plug-in
*/
```Tip
You can edit exported text files directly in the note before restoring them.
Run:
Screwdriver: Restore files from this note
Screwdriver restores files from fenced code blocks whose opening line starts with ```screwdriver:. It also supports compatible fenced blocks that contain a filename after the opening backticks.
Important
Restore only from notes you trust. Screwdriver writes files to paths recorded in the note.
Restore paths must be canonical, portable Vault-relative paths using / separators. Screwdriver skips absolute paths, parent traversal, backslashes, empty path components, control characters, and names that are invalid or reserved on common desktop platforms. When adjustObsidianDir is enabled, the portable .obsidian/ prefix is validated and mapped below the active Vault configuration directory.
Screwdriver can be useful with Self-hosted LiveSync or remotely-save when you want to sync configuration files between devices.

