File Name History
unlistedby David V. Kimball
Store file name or folder name change history into note properties.
File Name History Plugin for Obsidian
This plugin tracks file name and parent folder name changes for Markdown files in Obsidian, storing old names in a configured list property (like aliases). It supports customizable ignore patterns, debouncing, and folder-specific tracking, making it ideal for generating redirect rules (e.g., for Astro templates).
Particularly helpful when used in conjunction with Astro Composer Obsidian plugin and the Astro Modular blog theme.
Made for Vault CMS
Part of the Vault CMS project.
Features
- Tracks File Name Changes: Stores old file names in the configured property (default
aliases) after a rename, with a configurable timeout (default 5 seconds). - Tracks Parent Folder Renames: Optionally stores the old immediate parent folder name in the configured property when enabled (off by default).
- Ignore Patterns: Skips adding names matching regex patterns (e.g.,
^_for underscore prefixes,^Untitled$for "Untitled"). - Case Sensitivity: Toggle to treat case differences (e.g., "Note" vs. "note") as unique (off by default).
- Folder Filtering: Restrict tracking to specific folders or exclude others.
- File Extension Support: Tracks
.mdfiles by default, with support for custom extensions (e.g.,.mdx). - Configurable Property: Choose which frontmatter property stores the history (default
aliases). - Auto-Create Properties: Optionally creates the configured property if missing (on by default).
Installation
File Name History is not yet available in the Community plugins section. Install using BRAT or manually:
BRAT
- Download the Beta Reviewers Auto-update Tester (BRAT) plugin from the Obsidian community plugins directory and enable it.
- In the BRAT plugin settings, select
Add beta plugin. - Paste the following:
https://github.com/davidvkimball/obsidian-file-name-historyand selectAdd plugin.
Manual
- Download the latest release from the Releases page and navigate to your Obsidian vault's
.obsidian/plugins/directory. - Create a new folder called
file-name-historyand ensuremanifest.jsonandmain.jsare in there. - In Obsidian, go to Settings > Community plugins (enable it if you haven't already) and then enable "File Name History."
Usage
- Configure Settings:
- Open Obsidian Settings > Community Plugins > File Name History.
- Adjust options:
- History property name: The frontmatter property to store names (default
aliases). - Ignore regex patterns: Comma-separated regexes (e.g.,
^_,^Untitled$) to skip certain file names or folder names. - Timeout seconds: Time (1–20 seconds) to wait before adding names.
- Case sensitive uniqueness: Enable to treat "Note" and "note" as different.
- Auto-create properties: Enable to create the configured property if missing.
- Track folder renames: Enable to store old parent folder names.
- File extensions: Comma-separated list of extensions to track (e.g.,
md,mdx). - Include folders: Comma-separated paths to track (empty for all).
- Exclude folders: Comma-separated paths to exclude.
- History property name: The frontmatter property to store names (default
- Rename Files or Folders:
- Rename a file (e.g.,
note.mdtonew-note.md): After the timeout,noteis added to the configured property. - With
Track folder renamesenabled, rename a parent folder (e.g.,posts/note.mdtoposts-1/note.md):postsis added as well. - Names matching ignore regexes (e.g.,
_note.mdor_posts) are skipped.
- Rename a file (e.g.,
- Check History:
- View the configured property in the Properties view.
- Manually remove elements without affecting plugin behavior.
- Debugging:
- Open Obsidian’s developer console (Ctrl+Shift+I or Cmd+Shift+I) to see logs.
Example
- File:
posts/hello-there/file.md - Rename file to
posts/hello-there/new-file.md:fileis added to the configured property after 5 seconds (if not ignored).
- With
Track folder renameson, rename folder toposts/hello-there-1/file.md:hello-thereis added to the configured property.
- Rename folder to
posts/_hello-there/file.md:- No name added if
^_is in ignore regexes.
- No name added if
Notes
- Names are only added after the first rename (not on file creation).
- Use for Astro redirect rules by exporting aliases from properties.
- Report issues or suggest features on the GitHub repository.
License
MIT License
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.