Can Hazel treat a symlink as a directory?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Can Hazel treat a symlink as a directory? Sat Nov 15, 2014 9:18 pm • by njorogle
I have a really long and complex ruleset rule that I want to apply on 2 directories, "Movies" and "TV Shows". Previously these 2 dirs lived in ~/Media, but I've moved Movies to an external hard drive now. I don't want to duplicate the rules for the 2 dirs because they go out of sync too easily when I tweak them. The sub dir scanning however ignores Movies because I set it up to symlink to the new location.

Any way I can either
a) Tell Hazel that it should traverse into the symlink
b) Trick Hazel into traversing into the symlink
c) Have a rule set defined in once place and apply that ruleset to 2 folders
d ) Any other ideas?

Thanks in advance
njorogle
 
Posts: 6
Joined: Fri Dec 13, 2013 7:54 pm

There's no way to get Hazel to follow symlinks in this case. I'm afraid you'll have to have two sets of rules in this case.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

That does make sense - since hazel monitors dirs I can understand why symlinks wouldn't work.

Can I put in a feature request however that you can define a ruleset and then apply that ruleset as a rule on more than one folder?

This would make managing complicated rules much easier. I have some rules that are pretty complicated - almost 20 individual rules) and editing them in 2 places is really error prone.
njorogle
 
Posts: 6
Joined: Fri Dec 13, 2013 7:54 pm

Re: Can Hazel treat a symlink as a directory? Wed Nov 19, 2014 12:36 pm • by Mr_Noodle
I'll consider your problem though not sure if that's the best way to deal with it. Also, you might want to look into consolidating your rules. If the rules are very similar, I suggest looking into match patterns to see if you can boil them down to a more manageable set.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Appreciate the consideration.

Consolidating the rules wouldn't really work - there's a lot, but they do different things. For instance if I tag a file in a certain way I want to transcode and upload to one place, tagged differently I want to encode with a different quality and upload somewhere else. I want to always do some basic conversions of some file types, like mov files always get converted, mkvs get converted if they match certain rules wrt subtitles etc. Some show have their season numbers corrected.

Basically there's a bunch of manual stuff I want to do occasionally and to achieve that I just tag/color a file or dir and it happens. I also want a bunch of standard processing to happen always, but a bunch of different processing depending on the format / extension of the input files. There's a couple of rules I could consolidate (adding meta data to all files for instance), but not many. Incidentally another reason I don't / can't consolidate rules is because a lot of the time I have shell scripts that process in a scratch directory, then move the result back into the src dir - at that point I have a new file so the rule processing needs to match the new file and I can't just add a sub-rule to handle the next step in the process.

I know it all sounds a bit convoluted, but I've been using hazel for a while and the workflows I've built with it are quite advanced and extremely useful when processing all forms of media. Now my media doesn't share the same root folder I can't have a clean hazel setup unless I can have rule sets.

Hope I convinced you ;)
njorogle
 
Posts: 6
Joined: Fri Dec 13, 2013 7:54 pm

I think it might be more likely that I implement some way to go into symlinked/aliased folders at this point but I'm still thinking about it.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Either way would work for me. Tbh symlink scanning would likely be more convenient since there's no additional configuration. If you could figure out a way to make that work it'd be really awesome.
njorogle
 
Posts: 6
Joined: Fri Dec 13, 2013 7:54 pm

I would also like symlink support, but for a slightly different reason.

I'm currently in the midst of building lots of rules (for organizing scanned mail) and it would be nice to have a configurable base directory to send files.

Right now, I'm moving the documents to sub-directories under a parent directory "Location1", but in a year, I might want that same directory structure to be located under "Location2". If the move command recognized symlinks, I could create a symlink that pointed to Location1 today and then just repoint it to Location2 if I ever wanted to move the files.
tobinibot
 
Posts: 1
Joined: Sun Mar 08, 2015 3:40 pm

Another vote for symlink capability.
timbergman
 
Posts: 1
Joined: Mon May 04, 2015 1:09 pm

+1 for applying rules in symlinks.
Mondozer
 
Posts: 20
Joined: Thu Feb 24, 2011 3:52 pm

Re: Can Hazel treat a symlink as a directory? Mon Nov 02, 2015 12:06 pm • by Mr_Noodle
BTW, please post reasons as that plays into if/how I implement the feature.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support