New note named 'foldername/notename' gets auto moved and renamed

Use case or problem

Creating notes in sub-folders is not convenient or quick.

Proposed solution

When creating a new note w ctrl-N, if the note is named with a slash like so: ‘foldername/notename’ it can be auto moved into that folder and renamed without the foldername.

Current workaround (optional)

  1. right-click in the file explorer and choose new-note from the popup menu. If there are open folders in the file explorer or many folders this could involve a bit of scrolling to find the right folder.
  2. if you are making a link to the new note enter the folder [ [ foldername/notename ] ] and the new note will be in the specified folder, but the link will not be cleaned up and will show the folder name

Related feature requests (optional)

5 Likes

You can already do this. Try using Ctrl-O for open instead of Ctrl-N for new. Then if you type folder/new note, it will put a new note with that name in that folder automatically.

If the folder doesn’t exist, the folder gets created too.

Except… I seem to have found a bug, but don’t know how to recreate it yet. If I type more than one folder, folderA/folderB/New Note I can’t see folderB or New Note in the file explorer. But I’m testing this on iPad, so I can’t easily inspect the filesystem at the moment. The subfolder exists in my iPad Files app, but doesn’t show up in Obsidian.

1 Like

Ah I see. Control-O folder/note-note works great. Control-N folder/new-note also works but it gives you an error message that filename cannot contain “/”. It works anyway despite the error message. Misleading error should be fixed.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Use case or problem

I often want to create a new note in a particular folder. I’d like to be able to do this using only the keyboard. I’d also rather specify the new file & path in one operation rather than having separate creation and move steps.

Proposed solution

I’d love to be able to create a new note in a folder by pressing Ctrl-N and then typing “foldername/notename”, with the intention that this new note named “notename” be located inside “foldername”. This would ideally work for nested folders. If a folder did not yet exist, it would also be lovely to create it.

Trying this on Obsidian 1.3.7 AppImage on Ubuntu just gives a “file name cannot contain any of these characters: ‘/’” error and does not move this file.

Current workaround (optional)

  • Create a new note in the default location and then move it to the folder
  • Use the Open menu by pressing Ctrl-O, then type “foldername/notename” and press Shift-Enter to create the new note - works but clunky, have to re-map new note creation desire to “open” shortcut

Related feature requests (optional)

This was raised a year ago in this forum post but not implemented.

Another workaround is the plugin, “Advanced New File”. It seems to have this functionality.

(I think this FR got auto-closed because someone marked it as solution. I’ve reopened it. But I recommend exploring the workarounds, since this doesn’t have much popularity.)

1 Like

Would be very convenient to rename notes like this - with slashes being allowed, but each slash-separated part being interpreted as a folder and subfolders and the last part being the file name, the way it works in Visual Studio Code:

vs code renaming and subfolders