Auto Move File

approved

by sx kan

Automatically move or copy notes to target folders based on frontmatter properties or file names, with flexible rules and exact or fuzzy matching. - This plugin has not been manually reviewed by Obsidian staff.

18 stars1,412 downloadsUpdated 14d agoMIT

Made with ❤️ by Jituo Workshop

Auto Move File

English | 中文

Website: https://gitapp.net

An Obsidian plugin that automatically moves or copies files to specified directories based on frontmatter properties or filenames. Supports multiple rules, multiple property monitoring, and flexible target folder configuration.

🚀 Features

  • Auto Move/Copy Files: Automatically move or copy files based on frontmatter properties or filenames
  • Exact/Fuzzy Matching: Each rule can independently choose its matching mode to fit different archiving needs
  • Multi-Rule Management: Support for adding multiple rules, executed in order of matching
  • Rule Sorting: Support for adjusting rule order via buttons, affecting execution priority
  • Monitoring Mode Switching: Support for property monitoring and filename monitoring modes
  • Execution Priority Mode: Choose between rule order or property value order for priority
  • Real-Time Monitoring Toggle: Enable/disable real-time monitoring; when disabled, only manual button triggers work
  • Flexible Time Settings: Support for milliseconds/seconds/minutes delay time units
  • Custom Monitoring Properties: Can monitor any frontmatter property such as tags, status, category
  • Multiple Data Types: Support for array types (e.g., tags) and string types (e.g., status)
  • Folder Archiving: Support for archiving entire folders to target directories
  • Scan Scope Settings: Manually trigger scanning of specific folders only
  • Folder Selector: Visual selection of target folders
  • Full Chinese Support: Supports Windows paths and Chinese paths

📦 Installation

Method 1: Manual Installation

  1. Download the files from the repository
  2. Extract to your Obsidian vault's .obsidian/plugins/ directory
  3. Restart Obsidian
  4. Go to SettingsCommunity Plugins
  5. Find Auto Move File and enable the plugin

Method 2: Install from GitHub

  1. Download main.js, manifest.json, and styles.css
  2. Place files in .obsidian/plugins/auto-move-file/ directory
  3. Restart Obsidian and enable the plugin

🎯 Usage

Basic Workflow

  1. Open plugin settings and add rules
  2. Configure monitoring properties, trigger values, target folders, etc.
  3. Save settings
  4. Modify file frontmatter properties or filenames to match rules
  5. Files automatically move/copy to target directories

Global Configuration

SettingDescriptionDefault
Watch FolderOnly monitor files in specified folder (empty = entire vault)Empty
KeywordsKeywords that filenames must contain (empty = ignore, comma-separated for multiple)Empty
Delay TimeDelay before checking after file modification2000
Delay Time UnitMilliseconds(ms)/Seconds(s)/Minutes(min)ms
Scan FolderFolder to scan when manually triggered (empty = entire vault)Empty
Execution Priority ModeBy rule order / By property value orderBy rule order
Real-Time MonitoringEnable/disable auto-triggerEnabled

Rule Configuration

SettingDescription
Watch ModeProperty monitoring / Filename monitoring
Match Mode🎯 Exact match / 🔍 Fuzzy match
Watch PropertyFrontmatter property name to monitor (e.g., tags, status)
Trigger ValueTrigger archiving when property contains this value
Blocking ValueDo not move if property also contains this value
Target FolderTarget path for file movement
Folder Archive ModeArchive entire folder (instead of single file)
Copy ModeCopy file instead of moving (keep original)
Enabled StatusEnable/disable this rule

Configuration Examples

Example 1: Monitor tags

Frontmatter:

---

tags: [draft, article]
---

Rule Configuration:

  • Watch Property: tags
  • Trigger Value: published
  • Blocking Value: draft

Trigger: Change tags to [published] and save


Example 2: Monitor status

Frontmatter:

---

status: draft
---

Rule Configuration:

  • Watch Property: status
  • Trigger Value: published

Trigger: Change status to published and save


Example 3: Monitor filename

Filename:

project-published.md

Rule Configuration:

  • Watch Mode: Filename
  • Filename Contains: published

Trigger: Triggered when filename contains published


Example 4: Multi-Rule Priority

Rule 1 (Order 1):

  • Watch Property: tags
  • Trigger Value: published-wechat
  • Target Folder: archive/wechat

Rule 2 (Order 2):

  • Watch Property: tags
  • Trigger Value: published
  • Target Folder: archive/general

File:

tags: [published-wechat, published]

→ Moved to archive/wechat (Rule 1 priority)

🎚️ Match Mode Explanation

Each rule can independently choose between "Exact Match" and "Fuzzy Match":

🎯 Exact Match

  • Property monitoring: Property value must be exactly equal to the trigger value
    • status: published-article with trigger value published → ❌ No trigger
    • For array types (e.g., tags), one item must exactly equal the trigger value
  • Filename monitoring: Filename (without extension) must be exactly identical
    • Filename published.md with keyword published → ✅ Triggers
    • Filename project-published.md with keyword published → ❌ No trigger

🔍 Fuzzy Match (Contains)

  • Property monitoring: Triggers when property value contains the trigger value (case-insensitive)
    • status: published-article with trigger value published → ✅ Triggers
    • tags: [article/published/xiaohongshu] with trigger value published → ✅ Triggers
  • Filename monitoring: Triggers when filename contains the keyword (case-insensitive)
    • With keyword notes, filenames like daily-notes.md, notes2026.md, my-notes.md all trigger
    • Filename project-published.md with keyword published → ✅ Triggers

The blocking value uses the same match mode as the trigger value. Backward compatible: in existing rules, property monitoring keeps exact matching and filename monitoring keeps contains matching by default; you can change this when editing a rule.

Advanced: fuzzy match keywords are also regex-compatible (e.g., weekly|monthly). If you don't know regex, just type plain text — it behaves exactly like contains matching; invalid regexes automatically fall back to contains matching, so it never errors out.

⚙️ Execution Priority Explanation

By Rule Order (Default)

Priority is determined by the order of rules in the list. Rules listed first have higher priority.

Use Case: When you need precise control over which rule matches first

By Property Value Order

Priority is determined by the order of properties defined in frontmatter. Rules corresponding to properties defined earlier in the file execute first.

Use Case: When file properties themselves have priority meaning

Example:

status: completed
tags: [published]
  • Rule 1: Monitor tags = published
  • Rule 2: Monitor status = completed

→ Triggers Rule 2 (because status appears first in frontmatter)

🔧 Quick Commands

  • Check and Move Current File: Check if currently open file meets move conditions
  • Check and Move All Files: Check all matching files and batch move them

❓ FAQ

Q: Files not moving automatically?

A: Please check:

  1. Is real-time monitoring enabled?
  2. Is file within watch folder (if set)?
  3. Does filename contain keywords (if set)?
  4. Is the rule enabled?
  5. Are frontmatter property values correct?
  6. Does it contain blocking values?

Q: How to adjust rule priority?

A: In the rule list, click the ⬆️ or ⬇️ buttons on the right side of the rule to adjust order. Rules listed first have higher priority (when priority mode is set to "By rule order").

Q: How to only trigger manually without auto-archiving?

A: Turn off the "Real-Time Monitoring" switch. When disabled, file modifications won't auto-trigger; you can only trigger via the "Check All Files" button.

Q: How to debug the plugin?

A: Open Obsidian's Developer Tools (Ctrl + Shift + I), check the Console tab for detailed plugin logs.

📝 Changelog

v3.2.2

  • ✅ English-first README; Chinese documentation moved to README_zh-CN.md (fixes directory scan warning)
  • ✅ versions.json no longer included in release assets (per directory recommendation; the file stays in the repository)
  • ✅ No functional changes

v3.2.1

  • ✅ Bilingual README: added English section (intro/installation/usage) for the official directory
  • ✅ Added standard build script (scripts/build.js) for build verification
  • ✅ Added GitHub Actions release workflow with build-provenance attestations
  • ✅ No functional changes (main.js identical to 3.2.0)

v3.2.0

  • ✅ Added match mode option: each rule can choose exact or fuzzy matching
  • ✅ Fuzzy matching is contains matching (case-insensitive): type notes and every filename/property value containing it triggers
  • ✅ Fuzzy match keywords are regex-compatible (advanced usage); invalid regexes automatically fall back to contains matching
  • ✅ Filename monitoring added exact match (filename without extension must be identical)
  • ✅ Rule list now displays each rule's match mode
  • ✅ Marketplace compliance fixes: removed startup notice, scoped CSS styles, mobile compatibility (electron platform check), logs gated behind DEBUG flag, added versions.json

v3.1.0

  • ✅ Added real-time monitoring toggle
  • ✅ Added delay time unit selection (ms/s/min)
  • ✅ Added scan folder setting (for manual triggering)
  • ✅ Added execution priority mode switching (rule order/property value order)
  • ✅ Added rule up/down move functionality
  • ✅ Optimized folder selector with real-time updates
  • ✅ Author info updated to "Jituo Workshop"

v3.0.0

  • ✅ Support for multi-rule management
  • ✅ Support for property monitoring and filename monitoring
  • ✅ Support for folder archive mode
  • ✅ Support for batch rule operations

v2.4

  • ✅ Added custom monitoring property feature
  • ✅ Support for array and string types

👨‍💻 Author

Jituo Workshop

Website: https://gitapp.net

📄 License

MIT License

🤝 Contributing

Issues and Pull Requests welcome!

If you like this plugin, please give it a Star ⭐


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.