I’m fairly new to Obsidian and all its advanced features, so I apologize if what I write is unclear or incomplete.
I’m trying to find a way to pass and concatenate a simple variable to a local link path, kinda like this:
basepath = C:\Uni
[Lesson1](file:/// + basepath + \Math\Lesson1.pdf)
[Lesson2](file:/// + basepath + \Math\Lesson2.pdf)
My original objective was to use OS Environment Variables to dynamically build links, using the environment variable as base path, concatenate a relative path to its subfiles and subfolders, and be able to open the correct path everytime the base path is updated.
This way I can move all my Uni files (or easily migrate to a new machine) and only update a single variable line in Obsidian responsible for the base path.
Having done some research now I know Obsidian doesn’t support environment variables, but replacing that with a single local variable within Obsidian would still be great.
Moving my notes to the Uni folder is definitely something I don’t want to do.
I already tried using Dataview and YAML but any variable inserted in the parenthesis will only be seen as a string and not be replaced with its value. Maybe I’m missing something? example:
MathFolder ← will be seen as a note link and create a new note titled "
I tried Shell Commands and tried to make it work through shell, but either it’s outside the scope of the plugin or I’m not knowledgeable enough about Obsidian and Shell to make it work properly (probably both).
I also tried 2 text expanders but both didn’t seem to work properly at all.