Base Path Updater
approvedby Eric
Automatically update paths in Bases when folders are renamed or moved, with reviewable undo history. - This plugin has not been manually reviewed by Obsidian staff.
Base Path Updater
Automatically update path references in Obsidian Bases after folders are moved or renamed.
For example, when Work/Research is moved to Archive/Research, a Base that filters by that folder automatically uses the new path instead of requiring manual edits.
Features
- Automatic path updates: Responds to folder renames and moves, including references to their subfolders and files.
- Multiple view levels: Checks global Base filters, view-specific filters, and formulas.
- Reviewable undo history: Shows before-and-after paths for each affected Base and can undo one complete folder operation.
- Lightweight daily use: Does not scan on a timer or react to ordinary note edits; it only checks Bases after folder path changes.
Installation
Requires Obsidian 1.9.0 or later and the built-in Bases plugin. The plugin can currently be installed manually and is not yet listed in the Community Plugins directory.
- Copy the
dist/base-path-updaterfolder generated by this project to.obsidian/plugins/in your vault. - Confirm that the plugin folder contains
main.js,manifest.json, andstyles.css. - Reload Obsidian and enable Base Path Updater under Settings → Community plugins.
If you downloaded the source code, follow the development notes to generate the installation files first.
Usage and undo
Once enabled, move or rename a folder in Obsidian. The plugin updates matching Base paths and shows a notice when updates or errors occur.
You can open the history in three ways:
- Click the folder-sync ribbon icon and select View update history / undo.
- Search for Base Path Updater in the command palette.
- Open the plugin settings and select View history / undo.
Expand an entry to see how each Base path changed, then select Undo Base changes to restore it. History persists across restarts and keeps up to 30 operations, with a snapshot budget of approximately 5 MiB. When the budget is reached, the oldest entries are removed first. If one operation is too large, files that would exceed the budget are skipped and reported.
Undo restores Base content only; it does not move folders back. To keep a filter valid, move the folder back to its original location. When undoing multiple operations, start with the newest entry. If a file was manually edited, changed by a later operation, or deleted, the plugin skips it instead of overwriting newer content; other files from the same operation can still be undone.
Supported path forms
| Form | Example |
|---|---|
| Folder filter | file.inFolder("Work/Research") |
| Full file path filter | file.path == "Work/Research/Notes.md" |
| Path prefix filter | file.path.startsWith("Work/Research/") |
Single and double quotes are supported, as is placing the path on the left side of an equality comparison. Matching is case-sensitive. Only the original folder and paths below it are updated: moving Work/Research does not modify Work/Researcher.
When using startsWith for a folder, keep the trailing / as shown in the example to avoid matching similarly named folders.
Scope and limitations
- Only standalone
.basefiles are processed. Base code blocks embedded in Markdown are not processed. - Only folder moves and renames trigger path updates. Renaming an individual note does not trigger a scan.
- The plugin supports explicit fixed paths. Concatenated paths, variables, regular expressions, and other unsupported forms are not rewritten. YAML anchors, aliases, and custom tags are not expanded or modified.
- View names, property display names, and ordinary text are not modified. Matching filters or formulas may be rewritten using YAML double-quoted strings while preserving their meaning.
- Folder moves made while the plugin is disabled are not backfilled. Moves made in an external file manager also depend on whether Obsidian reports them as folder rename events.
- History is stored only in the plugin data directory for the current vault. The plugin makes no network requests, and history is not a complete vault backup.
See the implementation notes for design decisions, references, and acceptance checks. 中文说明请见 README.zh-CN.md。
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.