Newbie questions - attachments how to deal with them

  1. How to move all attached files and images from one one folder to another folder
  2. What plugins from the ones I mentioned (or others), or any at all?. do I really need for day-to-day use. I will need to be able to move notes between folders or delete notes and don’t want to come into situations where I need to clean things manually or have left overs etc…

What I am trying to do…
I am using the Importer plugin to import from Evernote .enex files. The notes are imported and the images and PDF files go to _resources folder.

Since I am new to Obsidian , I thought this is a problem because documentation assumes the folder is attachments. So I set the default folder in configuration to attachments and I tried to move the files to attachments folder by moving the notes within Obsidian.

Fail.

Only less than half of the picture and PDF files actually moved from _resources to attachments folder. It would refuse the move all files.

Then I tried to rename the _resources folder to attachments folder while Obsidian was running.

Another fail.

Now all pdfs and pictures show broken link (still pointing to _resources folder).

Ugh…

So I didn’t know what to do and I tried then various plugins, notably I tried with the following:

Consistent attachments and links
Auto Note Mover
Find orphaned files and broken links
File Cleaner
Nuke Orphants

Why I am a bit confused what I need is because coming from Evernote I didn’t have to think about cleaning attached files and images when importing, moving or deleting notes.

The reason I am trying to move resources to attachments is because the underscore "" didn’t work in one of the plugins, I believe the calendar plugin didn’t like it, so I had to remove the leading underscore.

So question… how to move the photos and pdfs from _resources to attachments and what plugins do I need to use?

Different software may work differently. It is important that you understand how the software of your choice works. These differences also make that seamless transition from one system to another is not always fluent.

Obsidian in principle operates without the need for a folder structure. Obsidian does not assume where your attachment lives: it identifies files and attachmentsby their unique name. Only when in a vault multiple files with the same name exist, a path is required for disambiguation. So preferred practice in Obsidian is to attempt to work with unique file names.

So I set the default folder in configuration to attachments and I tried to move the files to attachments folder by moving the notes within Obsidian.

Fail.

It does not work like this as I explained above. Obsidian retrieves attachments through the file name, so moving a note will not move the attachment. In reverse, you can move the attachment, it will still be found by the note.

Now all pdfs and pictures show broken link (still pointing to _resources folder).
Ugh…

That happens if many of the files have the same name, so need to be referenced by their path as well.

So question… how to move the photos and pdfs from _resources to attachments and what plugins do I need to use?

  • The easiest way to move the files will be in your operating systems’s file manager. I actually suggest to at first rename the"_resources" folders to “attachments”.

  • Then, you can easily update the links to these attachments by a global search for “_resources” and global change to “attachments”. You can use the " Global Search and Replace" plugin from within Obsidian, or external tools like a text editor that supports global search/replace over various files (e.g. VSCode) or command line utilities like “sed”.

I have now my pics and pdfs in _resources folder instead, I have now only 1 level folders and each folder has _resources subfolder. (It’s basically Evernote note structure).

Maybe I give up after all, the way you described, looks lot’s of work, don’t have much time now …)

What do you suggest I do, given that:

  1. I sort notes out (e.g. dump them initially to wrong folder and then sort them out later and move to a different folder)

  2. I cut/past images and pdfs between notes

  3. For me image files and pdf files do not exist when I look at Obsidian, I only care about notes with pictures and Pdfs.

  4. When I delete a note , I delete a note. I don’t want to have to deal with image and pdf by having to manually go to find them and delete them.

  5. I do not track the PDF file names, it’s possible PDFs I am copying into Obsidian have the same file name as another PDF already in Obsidian for another note (it may be a completely different file size).

  6. I may create a note in Obsidian with same name as another note already there, but with different content.

Do you have suggestion how to organize the attachment files in Obsidian?

  • Should I leave the _resources folder under the main Folder?
  • Should it be one _resources folder for the entire vault?
  • Should I have each picture/pdf attachment in its own folder?

Or it all doesn’t matter?

I am trying to understand what structure will be better for me to maintain and stay on top of my notes and reduce the effort of keep it clean.

Do I need any of those plugins I mentioned above?

Sorry if I sound like I have rigid form of thinking maybe around this subject, but I hope to avoid setting up the vault in a wrong way without understanding how it works.

Much appreciated.

Basically my question is about how to minimize potential left overs and mess given that I frequently do:

  1. moving notes between folders (notes contain image and pdf)
  2. cut and past image and pdf between notes (notebook or a different notebook)
  3. deleting notes

So what would be optimal structure to allow me to hunt down left-over files easily.
And also what plugins are a must for me to to maintain the database in order.

Maybe this here would be best structure for me.

  1. I don’t need to worry about what the picture and PDF file names are (mostly they are random) so I will be able to tell easier to which note the PDF and images belong
  2. I don’t care if there will be duplication of the same PDF, if the same PDF or image is also used in another note, that’s fine, just keep the _resources separate for each note

This seems to make the most sense so I have it easier hunting down the lef-overs after deleting notes in Obsidian

Now the 3 questions remain:

  1. moving note between notebooks
  2. cut / past image and pdf between notes
  3. deleting notes

How to make sure the image and PDF “travel” at the same time to the correct _resource folder for the note? Do I need to do that manually? What plugins I am going to need?

Or am I thinking the wrong way?

The current structure of _resources imported notes using the Importer plugin from Evernote is this:

If I create new note manually now, unfortunately Obsidian doesn’t create a separate sub-folder for the images and pdfs within the same note. Is there a way to do that using a plugin? I don’t see a setting…

Also, if I rename a note, is there a way to rename the subfolder to match the new name of the note?

Sorry for my stupid questions.

Chat GPT answer here…

Given your requirements and workflow, here’s a suggested approach along with some plugin recommendations:

Organizing Attachments:

Since you frequently move notes between folders and don’t track PDF filenames, it might be easier to keep each note’s resources separate. This means having a dedicated “_resources” folder within each note’s folder to store its associated images and PDFs.

To achieve this, you can manually create a “_resources” folder within each note’s folder. Obsidian doesn’t automatically create separate resource folders for each note, so this step would need to be done manually.

Dealing with Duplication:

As you’re not concerned about duplicate PDFs or images across different notes, having separate “_resources” folders for each note should work fine. Obsidian doesn’t automatically detect duplicates, so you may end up with multiple copies of the same file if it’s used in different notes.

Moving Notes Between Notebooks:

When moving notes between notebooks, you’ll need to ensure that their associated “_resources” folders move along with them. Currently, Obsidian doesn’t handle this automatically, so you’ll need to manually move the “_resources” folder along with the note.

Alternatively, you can use a plugin like “Dataview” or “File Explorer” or “Folder Note” plugin to facilitate bulk operations like moving notes and their associated resources.

Cut/Paste Images and PDFs Between Notes:

Similarly, when cutting/pasting images and PDFs between notes, you’ll need to ensure that the associated resources are moved along with the note. This would involve manually moving the files or using a plugin for bulk operations.

Deleting Notes:

When deleting notes, you’ll also need to manually delete their associated “_resources” folder to avoid leftover files. Alternatively, you can use a plugin to help identify and delete orphaned resources.

Automating Folder Creation and Renaming:

Regarding your question about automatically creating subfolders for images and PDFs within a note’s folder when creating a new note or renaming a note, Obsidian doesn’t have built-in functionality for this. However, you might be able to achieve this with a custom script using the Obsidian API or by creating a feature request in the Obsidian community. However, you can explore plugins like “Folder Note” or “Dataview” for possible solutions or consider scripting solutions outside of Obsidian.

Plugins:

You may not need additional plugins for your specific needs, but some plugins could enhance your workflow.

Dataview

This plugin can be helpful for managing and querying your notes and resources. It can assist with bulk operations and data manipulation.

*File Explorer *

This plugin provides a file explorer-like interface within Obsidian, making it easier to manage files and folders.

Obsidian Advanced URI

This plugin allows you to create custom URIs to link to specific resources or perform actions within Obsidian.

*File Tree *

This plugin allows to drag and drop notes and attachments between folders within your vault. This makes it easy to move notes and their associated attachments to different locations, helping you reorganize your vault as needed. The File Tree plugin allows you to perform bulk operations on multiple notes and files, such as renaming, deleting, or moving them. This can be useful if you need to make changes to multiple items at once, such as renaming folders or deleting obsolete attachments.

Folder Note

The Folder Note plugin for Obsidian allows you to associate a folder in your file system with a note in Obsidian. This can be particularly useful for managing attachments and organizing your notes, especially if you want to maintain a closer relationship between your notes and their associated files.

Automated Folder Creation: When you create a new note in Obsidian, the Folder Note plugin can automatically create a corresponding folder in your file system. This ensures that each note has its own dedicated folder for attachments, helping you keep track of them more easily.

Syncing Attachments: By associating a folder with each note, any attachments you add to the note within Obsidian will be stored in the corresponding folder in your file system. This can simplify the process of managing attachments, as you don’t have to manually move them to separate folders.

Renaming Folders: If you rename a note in Obsidian, the Folder Note plugin can automatically rename the associated folder in your file system to match the new note name. This helps maintain consistency between your note titles and folder names, making it easier to locate and manage your notes and attachments.

Enhanced Organization: With each note having its own dedicated folder, you can organize your attachments more effectively and reduce the risk of clutter or confusion. This can be especially helpful if you frequently move notes between folders or reorganize your notes.

Overall, your proposed structure of having separate “_resources” folders for each note aligns well with your workflow and requirements. With the help of the recommended plugins, you should be able to efficiently manage your notes and associated resources in Obsidian.

Okay so seems I am good for now, at least I trust for ChatGPT recommends here.

Here are additional responses to question whether I need the other 5 plugins mentioned in my original post:

Let’s go through each plugin and see if they align with your needs and the context we discussed earlier:

1. Consistent attachments and links: This plugin helps maintain consistency in attachment and link formatting across your notes. It ensures that attachment and link paths are standardized, which can be useful for organizing and managing attachments. If you want to ensure consistency in your attachment and link formatting, you may find this plugin helpful.
2. Auto Note Mover: This plugin automatically moves notes to a specified folder based on configurable rules. While this could potentially help with organizing your notes, it may not be necessary if you prefer to manually organize your notes or if you’re already using the File Tree plugin for organization.
3. Find Orphaned Files And Broken Links: This plugin helps identify orphaned files (files not linked to any notes) and broken links within your vault. If you’re concerned about managing orphaned files and broken links, this plugin can be useful for identifying and resolving these issues.
4. File Cleaner: This plugin provides tools for cleaning up unused files and removing redundant files from your vault. It can help streamline your vault by removing unnecessary files and reducing clutter. If you’re looking to maintain a clean and organized vault, this plugin can be valuable.
5. Nuke Orphans: This plugin deletes orphaned files (files not linked to any notes) from your vault. It complements the “Find Orphaned Files And Broken Links” plugin by providing a way to automatically remove orphaned files. If you want to automatically clean up orphaned files from your vault, this plugin can be useful.

Based on your requirements and preferences for organizing and managing your notes and attachments, here are some recommendations:

** Keep plugins that directly support your organizational needs, such as the File Tree plugin for managing file hierarchy.*
** Consider keeping plugins that help ensure consistency and cleanliness in your vault, such as “Consistent attachments and links” and “File Cleaner.”*
** Evaluate whether plugins like “Auto Note Mover” and “Nuke Orphans” align with your workflow and if you would benefit from their automation features. If you prefer manual organization or already have alternative methods in place, you may choose to uninstall these plugins.*

The terms “redundant,” “not used,” and “orphan” generally refer to attachments that are no longer associated with any notes in your vault. This can happen if a note containing the attachment is deleted, or if the attachment was moved or renamed outside of Obsidian without updating the links.

If you decide to keep the File Tree plugin, it can indeed help you identify and manage redundant attachments. Here’s how:

1. Identifying Redundant Attachments: With the File Tree plugin, you can visually inspect your file hierarchy to see which attachments are not associated with any notes. You can look for attachments in the _resources folders that are not referenced by any notes in the corresponding folder or subfolders.
2. Deleting Redundant Attachments: Once you’ve identified redundant attachments using the File Tree plugin, you can delete them directly from the file explorer interface within Obsidian. This allows you to clean up obsolete attachments without leaving the application.

Regarding the other plugins:

** Find Orphaned Files And Broken Links: *

This plugin specifically focuses on identifying orphaned files (attachments not linked to any notes) and broken links within your vault. While the File Tree plugin can also help identify orphaned attachments, the “Find Orphaned Files And Broken Links” plugin may offer additional features or a different interface for managing these issues. You may choose to keep or remove this plugin based on your preferences and workflow.

** File Cleaner: This plugin provides tools for cleaning up unused files and removing redundant files from your vault. While some of its features may overlap with what the File Tree plugin offers, it’s worth evaluating whether the additional functionality provided by the File Cleaner plugin (such as identifying and removing unused files) aligns with your needs.*

** Nuke Orphans: This plugin specifically focuses on deleting orphaned files from your vault. Since the File Tree plugin can help identify and manage orphaned attachments, you may not need the “Nuke Orphans” plugin if you’re already using the File Tree plugin for this purpose.*

File Cleaner Plugin:

The “File Cleaner” plugin provides several additional functionalities beyond identifying and removing orphaned files (attachments not linked to any notes) and broken links. Here are some features that could be useful for you:

1. Identifying Unused Files: The File Cleaner plugin can help identify files that are not referenced by any notes in your vault, even if they are not strictly orphaned. This means it can detect files that are not directly linked to any notes but may still be used in other contexts, such as embedded images in Markdown files or files referenced indirectly.
2. Removing Redundant Files: In addition to deleting orphaned files, the File Cleaner plugin can help you identify and remove redundant files from your vault. This includes files that are duplicates or near-duplicates, as well as files that are no longer needed due to changes in your note structure or content.
3. Advanced Filtering Options: The File Cleaner plugin offers advanced filtering options that allow you to customize the criteria used to identify unused or redundant files. This can help you fine-tune the cleanup process to target specific types of files or exclude certain files from consideration.

While the “File Tree” and “Find Orphaned Files And Broken Links” plugins may help you identify and manage orphaned files, they may not offer the same level of granularity or flexibility in identifying and removing unused or redundant files. The File Cleaner plugin complements these plugins by providing additional functionality for cleaning up your vault and reducing clutter.