In bases, find top level folder of a path

What I’m trying to do

I want to create a column in a base that contains the top-most directory in each file’s path.

I can’t find anything in the Obsidian base function list that seems to give me the full path to the file. If I had that, I could then use slice() to parse it and give me the first term.

I stumbled on the answer to my problem.
file.asLink().split(“/”,1)
Gives me a column with the top-most folder in the path (inside the Vault, that is.)

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