Things I have tried
I have tried extensive searching and looking through documentation for dataview and templater, all to no avail.
I have a template file with these lines in it:
path: <% tp.file.path(true) %>
fullpath: <% tp.file.path(false) %>
When I load it into a file, I get these (correct) values:
path: templates/templater-tests/level01/level02/level03/level3-tmpl-test.md
fullpath: /Users/ge/Dropbox/obsidian/testbed/templates/templater-tests/level01/level02/level03/level3-tmpl-test.md
I’m looking for a way to imitate the linux/macos ‘dirname’ command:
~/testbed $ ls templates/templater-tests/level01/level02/level03/level3-tmpl-test.md
templates/templater-tests/level01/level02/level03/level3-tmpl-test.md
~/testbed $ dirname templates/templater-tests/level01/level02/level03/level3-tmpl-test.md
templates/templater-tests/level01/level02/level03
In other words, I’d like the results of <% tp.file.path(true) %> without the final file name.
Is there a way to do it?
Thanks for your help.
- ge, chapel hill, nc