Page 1 of 1

Of Tags and Subfolders: A Filing System with Issues

PostPosted: Sat Apr 04, 2015 8:30 pm
by njwfish
I am new to Hazel, new in the past 3 days. I am a programmer, and I'm trying to create a system of cascading tags, to the effect of tagging all files within a folder with the name of all folders above it in that tree. The way I chose to accomplish this is by tagging every file, including folders, with the name of the enclosing folder, then copying the tags of the enclosing folder and tagging all files/folders with those.

e.g. (Folders are followed by an f)

Code: Select all
Google Drive f
    Inbox (Google Drive) f
       File1 (Inbox, Google Drive)
    Active (Google Drive) f
       Project1 (Active, Google Drive) f
          Project1Plan (Project1, Active, Google Drive)
    Active (Google Drive) f


As such, I decided to implement this system: http://www.scrubbs.me/my-notes-blog/2014/5/19/tagging-all-the-files-with-hazel

But modified, instead of hard coding each subfolder level, I do the same thing with tagging. Tag everything with the enclosing folder's name, then copy the tags. That's the theory anyway. There are two (resolved) issues here:

1: Hazel seems only to traverse to the third level of subfolder, I have no idea why. When I insert it further down the tree is works fine. I've looked for this issue, but couldn't find anything. I have done all the suggested troubleshooting, and no flags come up.

This issue I have resolved (it was an issue of any vs all conditions being true and not dictating which files not to process).

2: The copying tags rule doesn't always work. Or rather, it will only copy the first tag. I am wondering if there is a way to get a list of the tags of the enclosing folder to use to tag the inner folder.

I just fixed this, by using comments, now the only question is how to take a single tag with comma delimited subtags, and make them into a bunch of separate tags, then delete the original.

My bet is that this is impossible with Hazel, so if anybody knows how to do it with an Applescript, that'd be immensely helpful.

Thank you for any assistance.

Re: Of Tags and Subfolders: A Filing System with Issues

PostPosted: Mon Apr 06, 2015 2:59 pm
by Mr_Noodle
There's no way to copy a full tag list at the moment so yes, a script would be needed. In general, I'm looking into support for list-based attributes. Not sure how exactly it will be integrated but I'm looking into ways of being able to refer to and manipulate lists in different contexts.