Moving folders with identical names

Hi all,

I have a duplicate file structure for projects in both markdown notes (in obsidian) and folders in finder for all other documents not written in markdown. I wrote a pretty simple hazel/shortcuts workflow to create files and folders where, if I create a new folder/file in my “project” folder in Obsidian an identical folder will be created in my “project” folder in finder and vice versa (it also creates a new project in Things). However, I’m running into issues when it comes to moving those files when I’m finished with the project. As of right now, I need to manually move my obsidian folder to my archive, then move my finder folder to the archive, and complete the task in things.

In a perfect world I would be able to create a hazel action that would recognize when a folder is moved into my obsidian archive, find its matching folder in finder and move it to the archive, and complete the project in Things. It would also be acceptable to run a shortcut via quick action on a folder in finder.

Any insight would be appreciated!

1 Like

Maybe use a simple prefix or suffix on the top level of one set. Eg projectname_o Not ideal, but mostly foolproof

Or to move both sets of file structures to an archive, use a tool like Hazel, and include a renaming function.

Unless the goal is to combine the two sets of folders into one. Then maybe move one set wholesale, and use a tool like Hazel to move all files from each sub folder into the similarly named sunflower of the archive directory. This might be the trickiest to implement, but the cleanest result.

If hazel is watching those folders, I would definitely use hazel to move those folders elsewhere or at least integrate hazel into the process.
Otherwise hazel might be confused and recreate the folder structure you were just archiving. If you can, always try to not use clever rules precedence.

To automate things their new shortcuts actions are quite easy to use. So my suggestion would be a shortcut “archive project” that a) completes the project in things and b) places a special file into both the obsidian and finder folders. Hazel is looking for that special file and moves both folders into your archive, possibly renaming them and removing the special file.
In your other hazel rule you could include a condition to only duplicate the folder, if the special file is present.

Tags would be even nicer than a special file, but I think shortcuts can’t do them. Also, the temporary special file is not that bad.

Thanks for the suggestions! I eventually realized that I was overthinking it a bit. Considering that obsidian just stores all of its notes in a folder on my hard drive, I just merged the two trees instead of keeping a duplicate system in another place on the hard drive. If Obsidian is able to open the file I can access it there, and if not it goes through Finder. That way I just have hazel monitor the archive folder and check things for projects to mark as complete whenever I move something into it.

Sometimes the easiest solution is to just change thr problem

1 Like