雷士电26 downloadsCopy the names, vault-relative paths, absolute paths, wiki links, Markdown links, and Obsidian URIs of multiple selected notes to the clipboard at once.
Copy the names, vault-relative paths, absolute paths, wiki links, Markdown links, and Obsidian URIs of multiple selected notes to the clipboard in one go.
Obsidian's file explorer has no copy action for a multi-selection: right-click a selection and the context menu offers only New folder and Delete. The native Copy current file path commands act on the active note only. This plugin fills that gap.
From Obsidian (once listed in the community directory)
Open this link, or search for Batch Copy Names and Paths under Settings → Community plugins → Browse:
obsidian://show-plugin?id=batch-copy-paths
Manually
Download main.js and manifest.json from the latest release into <vault>/.obsidian/plugins/batch-copy-paths/, then enable the plugin under Settings → Community plugins.
With BRAT
Add zhaoscsc/obsidian-batch-copy-paths as a beta plugin.
| Format | Example |
|---|---|
| Vault-relative path | Notes/meeting-notes.md |
| Note name | meeting-notes |
| File name | meeting-notes.md |
| Absolute path | /Users/you/Vault/Notes/meeting-notes.md |
file:// URL |
file:///Users/you/Vault/Notes/meeting-notes.md |
| Wiki link | [[meeting-notes]] |
| Markdown link | [meeting-notes](Notes/meeting-notes.md) |
obsidian:// URI |
obsidian://open?vault=Vault&file=Notes%2Fmeeting-notes.md |
Right-clicking an item that is not part of the selection falls back to Obsidian's single-file menu, so only that one item is copied. That is native behaviour.
Folders deliberately do not get these options. If the selection contains no files at all, no menu entries are added. In a mixed selection, folders are filtered out — see Skip folders below.
| Setting | Default | Description |
|---|---|---|
| Menu layout | Flat | Show every format directly, or nest them under one Batch copy submenu. |
| Show item count | On | Append (N items) to the menu labels. |
| Formats | Vault-relative path, note name, absolute path | Which formats appear in the context menu. |
| Separator | New line | Also comma, ideographic comma, space, or custom. |
| Sort | Selection order | Or by name, or by path (Chinese collation aware). |
| Skip folders | On | Drop folders from mixed selections. |
| Normalize to NFC | On | Avoids the macOS NFD/NFC mismatch on non-ASCII filenames. |
| Show notice | On | Confirm after copying. |
This plugin registers no command palette commands. Everything lives in the file explorer context menu.
files-menu, the event for a multi-selection context menu, was added in that version).tree.selectedDoms set, falling back to a DOM query. Cost stays proportional to the selection rather than to the vault size, and rows scrolled out of view are still included.adapter.getFullPath(), not from string-concatenating basePath.tree.selectedDoms and MenuItem.setSubmenu() are not part of the public API. Both are feature-detected, and the plugin degrades gracefully (DOM fallback, flat menu) if they change.getSettingDefinitions() on Obsidian 1.13.0+, where Obsidian handles rendering, settings search and persistence; and the classic display() tab on older versions, which Obsidian 1.13+ skips. Both derive from the same descriptor list, so they cannot drift apart.Everything happens locally. The plugin makes no network requests and collects no telemetry, and it does not read your notes. Its only interaction outside Obsidian is writing to the system clipboard, which is the entire point of the plugin: it writes only the strings you explicitly asked it to copy, and it never reads existing clipboard contents.
npm install
npm run build # builds main.js into the repository root
npm run typecheck
Set VAULT to also deploy the build into a vault for local testing:
VAULT="/path/to/vault" npm run deploy
main.js is a build artifact and is not committed. It is attached to each GitHub release, which is what Obsidian downloads.
Source layout:
main.ts plugin entry: event wiring, menu construction
formats.ts format registry — a new format is one entry here
settings.ts settings type, defaults, and the settings tab
MIT. See LICENSE.
在文件列表里 Option/Shift 多选笔记 → 在选中范围内右键 → 一次性把所有选中项的名称或路径复制到剪贴板。
file:// 链接、双链、Markdown 链接、Obsidian URIdisplay();两者由同一份描述生成