Rules won't run on my synology nas folder

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

Moderator: Mr_Noodle

Rules won't run on my synology nas folder Sat Nov 28, 2015 6:00 am • by tjordan
Hi there,
I've tried to find a solution to this, I'm assuming there's somethings simple I'm missing.

In short:
* I have a hazel rule to rename a pdf file file
* the rule works fine when I run it on a folder that's on my mac book pro
* the rule doesn't run when I run the exact same rule on the exact same file, when it is contained in one of the folders on my sinology nas.

When I check the logs there doesn't seem to be an error.

When I click on the eye icon at the bottom of the hazel window over the nas folder it opens up a screen that clearly shows the files on the folder, but theres an 'x' against that particularly rule.

Hoping someone can point me in the right direction.
tjordan
 
Posts: 2
Joined: Fri Jun 05, 2015 8:23 am

If the rule doesn't match in the preview, then you need to double-check the file's attributes against what the rule is matching. If you click the "i" button, it will highlight the field which caused it not to match, which should help you track it down. Otherwise, please post more details about the rule.
Mr_Noodle
Site Admin
 
Posts: 11251
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Rules won't run on my synology nas folder Wed Dec 02, 2015 9:45 pm • by jormsby
I have the exact same problem. I have been running rules against a folder on my internal hard drive and wanted to move the process to my Synology NAS.

I created a new folder in Hazel and pointed it at the folder on the NAS. I then exported the rules from the original folder (which is still on my internal drive). I then imported those rules into the NAS folder. I have a test pdf that has been OCR'd sitting in my original folder and a copy of it in the NAS folder.

The rule says if ALL of the following conditions are met:

Contains the name John
Contains the word Explanation
Does a Date Match

Doing a preview of the internal folder shows that the file matches the rule but a preview of the NAS folder shows that it does not. In addition, a log file obtained when running the rules against the NAS folder says that the Test file did not match any rules.

Based on your comment about clicking on the "i" button, I did this for both copies of this file. The one on the internal drive showed 29 different attributes but the one on the NAS drive only showed 13 with the last one on the list being "Sub-File/Folder Count".

There were no fields 'highlighted' for the file on the NAS and the only one highlighted for the file in the internal folder was at the very bottom under "Custom Tokens" and it was for a Date Match.

If I change the rule for the file on the NAS from "IF ALL…" to "IF ANY of the following conditions…" then the preview will indicate that the file matches the rule. Then, if I click the 'i' button, it has added a new attribute to the list and it is the same highlighted Date Match as the version of the file on the internal drive.

So, it appears that Hazel is not finding the name John and/or the word Explanation in the copy of the file on the NAS.

Any ideas on what to try next?
jormsby
 
Posts: 27
Joined: Mon Oct 13, 2014 7:04 pm

Re: Rules won't run on my synology nas folder Thu Dec 03, 2015 11:40 am • by Mr_Noodle
Are you using "Contents contain" or "Contents contain match"? If the former, then the problem is probably with Spotlight. You need to make sure that the drive is properly indexed by Spotlight otherwise those conditions won't match. Google around on how to rebuild your Spotlight index and see if it works after that.
Mr_Noodle
Site Admin
 
Posts: 11251
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Rules won't run on my synology nas folder Thu Dec 03, 2015 3:23 pm • by jormsby
Yes, I am using "Contents contain". Is there someplace that explains the differences?

Anyway, although I have only done a quick check so far, I am claiming success. It appears that your suggestion worked.

I learned a couple of things. First, I had assumed Hazel did it's own searching inside a document. I did not realized that it relied upon Spotlights indexed data. Second, I did not realize that you could even get Spotlight to index a network drive. :oops: :roll:

I found the info on how to index a network drive at this link: https://jonathansblog.co.uk/how-to-enable-spotlight-indexing-on-a-network-drive

Although I am a neub when it comes to Terminal, enabling the functionality was easy.

I have a feeling that this same solution would help the original poster based on his post.

Thanks for the help.
jormsby
 
Posts: 27
Joined: Mon Oct 13, 2014 7:04 pm

"Contents contain" uses Spotlight for performance reasons. "Contents contain match" does a direct scan of the file. In general, it's best to have Spotlight working with Hazel as there are plenty of other things which may not work well without it.
Mr_Noodle
Site Admin
 
Posts: 11251
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support