Obsidian://new?path= Not working with a subfolder inside the vault

Steps to reproduce

Both paths are encoded properly but the example is not showing this for simplicity

This works

osascript -e "open location \"obsidian://new?path=path/to/vault/test.md\""

This one doesn’t work

osascript -e "open location \"obsidian://new?path=path/to/vault/subfolder/test.md\""

Expected result

Both works (and be consistent with how path works with open), from the docs both should behave similarly

  • path a globally absolute path. Works similar to the path option in the open action, which will override both vault and file.

Actual result

  • vault/test.md is created
  • vault/subfolder/test.md not created

Environment

  • Operating system: macOS 11.3
  • Obsidian version: 0.11.13

Additional information

is obsidian already open when you run these scripts?

I tried when it was open & when it was closed. Same result.

post a screen recording.

does subfolder exist?

Is that even allowed to put full paths in there? I remember from a Desktop starter I created to make new notes inside an “Inbox” folder that it should look like so:

[Desktop Entry]
Name=New Inbox Note
Exec=sh -c 'xdg-open "obsidian://new?vault=Schreiben&file=+Inbox/$(date +"%%Y-%%m-%%d %%H.%%M").md"'
Comment=Creates a new date/time-stamped inbox note in Obsidian
Terminal=false
Icon=obsidian
Type=Application

This works, in any case.

@WhiteNoise

Yes, the subfolder exists.

Here is a demo with a new clean vault

@Moonbase59 accroding to the docs Using obsidian URI if you use path with open or new you don’t need vault or file. And it already works consistently with open but not with new.

Thanks for the pointer!

1 Like

Gave it a quick one from the terminal in Linux Mint 20.1/Cinnamon, Obsidian/AppImage 0.11.13, Installer 0.10.11:

xdg-open "obsidian://new?path=/home/matthias/Dokumente/Schreiben/xyzzy.md"

works,

xdg-open "obsidian://new?path=/home/matthias/Dokumente/Schreiben/+Inbox/xyzzy1.md"

doesn’t work.

So I see the same behaviour as you do.

1 Like