Move Folder
move_folderMoves an entire folder subtree to a new path and rewrites every vault link pointing into it, keeping internal and backlinks intact. Fails before moving if any destination file exists.
Instructions
Move an entire folder subtree to a new location in one call, rewriting every link across the vault that points into the moved subtree — the folder-level analogue of 'rename'.
Moves all files under old_dir (.md notes, attachments, and any other files) to the matching path under new_dir, preserving structure. Links between documents inside the subtree and backlinks from outside are all rewritten. The search index is updated immediately — do not call 'reindex' afterward.
The move is atomic at the gate: if any destination file already exists, the call fails before moving anything. Link rewrites are best-effort — a source that cannot be rewritten is reported in failed_links rather than aborting the move. Note: an OS error during the move phase itself (permission error, full disk, concurrent file removal) can leave the subtree partially moved with the index unchanged; call 'reindex' to reconcile the index with the on-disk state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_dir | Yes | Relative target folder prefix (e.g. "archive/2026"). May be an existing folder — files merge in; a per-file name clash aborts the whole move. | |
| old_dir | Yes | Relative source folder prefix (e.g. "drafts"). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||