Add command palette function to move note's enclosing folder using `Move folder to...` dialog

Use case or problem

There is an option to move a folder exposed in the popup menu when right-clicking on a folder, but there is no corresponding command.

Proposed solution

Create a command, Move enclosing folder, that can be called from the command palette when editing/viewing a file. Allow it to be bound to a hotkey if we desire but do not bind by default. (I would not bind it, but some may want to)

Scenario:

  1. User opens a file in Obsidian and reads/edits it
  2. User decides to move the entire folder the file is in
  3. User opens the command palette and fuzzy-finds the command Move enclosing folder
  4. Obsidian displays the same popup menu as the existing right-click Move folder to... function
  5. User fuzzy-finds the desired folder and presses Enter
  6. The folder containing the current file is moved to the selected folder
  7. Obsidian displays a toast notification Folder moved (or better: Folder moved to: [path from vault root])

Current workaround (optional)

Move mouse, find enclosing folder, right-click, then proceed from step 5.

Related feature requests (optional)

Obsidian currently provides no toast notification confirming success on file or folder moves. I will open a separate feature request and link them together.

5 Likes

+1 for this

This would be a great feature - I frequently move files through the command palette, and would love a way to quickly move folders as well. Two use cases for me would be 1) if I have a folder containing many notes for a particular project (or other grouping) and I want to move that project (or group) to a different parent folder, and 2) if I am revamping my organizational structure (which I’ve been known to do from time to time).

For #2 particularly, I may be moving folders all over the place, and the more I can keep on the keyboard, the more efficient things are.