File Name History

unlisted

by David V. Kimball

Store file name or folder name change history into note properties.

3 starsUpdated 1mo agoMIT
View on GitHub

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.

file-name-history-preview

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 .md files 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

  1. Download the Beta Reviewers Auto-update Tester (BRAT) plugin from the Obsidian community plugins directory and enable it.
  2. In the BRAT plugin settings, select Add beta plugin.
  3. Paste the following: https://github.com/davidvkimball/obsidian-file-name-history and select Add plugin.

Manual

  1. Download the latest release from the Releases page and navigate to your Obsidian vault's .obsidian/plugins/ directory.
  2. Create a new folder called file-name-history and ensure manifest.json and main.js are in there.
  3. In Obsidian, go to Settings > Community plugins (enable it if you haven't already) and then enable "File Name History."

Usage

  1. 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.
  2. Rename Files or Folders:
    • Rename a file (e.g., note.md to new-note.md): After the timeout, note is added to the configured property.
    • With Track folder renames enabled, rename a parent folder (e.g., posts/note.md to posts-1/note.md): posts is added as well.
    • Names matching ignore regexes (e.g., _note.md or _posts) are skipped.
  3. Check History:
    • View the configured property in the Properties view.
    • Manually remove elements without affecting plugin behavior.
  4. 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:
    • file is added to the configured property after 5 seconds (if not ignored).
  • With Track folder renames on, rename folder to posts/hello-there-1/file.md:
    • hello-there is added to the configured property.
  • Rename folder to posts/_hello-there/file.md:
    • No name added if ^_ is in ignore regexes.

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.