A workaround to add folders that contains files inside obsidian notes?

I use Obsidian to keep literally everything organized that is on my pc (excel and word files, pdfs, scripts, …).
I can add almost everything inside a note except for folders (that contains other files like the ones I have previously mentioned).
I sometimes need to add folders, is there a way? Maybe the folders can be transformed in a file so that I can add them in my notes?
Thank you

Have you looked into any of the folder note related plugins? They’d allow you to link to folder notes which then displays the folder.

Other than that, you might want to look into using something like Dataview to list the folder contents.

And if that’s not helpful, what do you expect to see when “adding a folder”?

2 Likes

Thank you for the answer. I have asked my question very badly and it was difficult to understand. I meant that I was searching a way to embed folders inside notes without messing my folder structure in the vault.
For example I want to have a note in which I store all the picture I took over the years. Since they are a lot I would like to keep them inside folders divided by years. But I don’t think there is a good way to embed folders inside notes.

For now I use the workaround to compress the folder in zip format and embed it inside the note.
Sometimes I use to ctrl drag the folder inside the note but this method is unreliable since if I change the folder location the link brokes.

I don’t know if there are better methods.

Symlink a top level folder which will never be moved. And then you won’t need to deal with absolute paths that can break.
On each restart of Obsidian, the program will sort the changes. How fast? I cannot say.
I have NOT experimented this often enough but I know this method works with PDFs, MP4s, images. Don’t ask me about files that Obsidian cannot open innately, as I don’t have enough information. Try with a test vault first, see what it gets you.

Bottom line is for Obsidian it doesn’t seem to matter which folder the actual files are in, as long as the filenames are unique.

Goes without saying I wouldn’t rename and rearrange stuff often or drastically below this top-level folder as it could cause Obsidian to work extra on start-up.

Thank you for the answer but I haven’t enough technical knowledge to understand what you mean. What I understood is that:

  • symlink works with relative path
  • ctrl drag into obsidian works with absolute path

I don’t see the difference between the two, in either case if I never move the folder/file the link won’t break otherwise it will. Thank you for any clarification

Depending on your OS, you need to find the proper command to symbolically link the topmost folder. You can get ChatGPT to help you with the command.

See in my case:

  • 50GB worth of PDFs (mostly PDFs as these files are handled by Zotero).
    You can see the folder is just hanging in abeyance there, above the markdown files. It can be anywhere, but I added it to a Zotero folder since these files are needed for the md files below. But the symlinked folder can be anywhere in your vault. Don’t even need to be in the attachment folder, as you can see. The attachment folder is above it, separately in ‘assets’.
  • If you work with multiple OS’s, you need to symlink on each OS as they are not interchangeable. So you symlink again on Linux, or whatever and place the symlink made on Linux below/next to the Windows symlink.

Once I added a 100+ GB from an external hard drive, with something like 100+k files (I didn’t want this to happen but I didn’t foresee having to remove so many small files, so it just happened). In cases sometimes the folders were 6-7 deep even. No problem.

In Obsidian, you just link the file, without relative or absolute paths:

  • You can see the PDF is rendered and no paths are given, only the filename, with embed format.
    It goes without saying that if you embed a Word document, Obsidian cannot handle it, but you may try to hunt down a plugin that will display it embedded.

The good thing about symlinks is that I don’t have those PDFs in the vault’s attachment folder or anywhere physically, so they don’t count toward sync or git quota.

1 Like

Thank you for the explanation!

1 Like

Maybe this can do it, but I never tried it:

1 Like