Massive Edit - Lots of Rules

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

Moderator: Mr_Noodle

Massive Edit - Lots of Rules Tue Jul 14, 2015 3:55 pm • by Phantom27
I have hundreds of rules for a single folder (my action folder). I have my scanner auto dump files into this folder when it scans something. I'm running into a conflict with another computer because this folder is a dropbox folder and my computers are syncing the files so fast that Hazel is running on both computers and I end up with duplicate files in the folder.

I can't disable dropbox or hazel on either computer. I can't point hazel to different folders.

I had 2 ideas but both require editing hundreds of rules manually.

1.) I could change the filename trigger slightly on one computer. I currently use "zSCAN", I could make it "cSCAN" or something like that. Doing this would require me to change every rule manually.

2.) I could make it so each computer scans into a different folder first, and add a rule where it moves it to the Action folder when it's done processing everything, then dropbox syncs. This also requires me to manually change every rule.


So..... Is there a way to change all the rules in a folder? I tried opening the exported file in textedit, then doing a find and replace to swap zSCAN for cSCAN but it didn't work.

Any ideas or do I just need to set aside a day to manually change each rule?
Phantom27
 
Posts: 13
Joined: Mon Sep 09, 2013 11:08 pm

Re: Massive Edit - Lots of Rules Wed Jul 15, 2015 1:59 pm • by Mr_Noodle
There's no way to do that and I would not recommend trying to edit the rules files. Also, are you running Hazel on two computers operating on the same set of files? If so, that is a very bad idea.

Otherwise, I suggest elaborating more on your specific workflow as there may be other ways to handle your issue.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Massive Edit - Lots of Rules Wed Jul 15, 2015 5:21 pm • by Phantom27
Ok. FYI: I may have found a solution.

So I have hazel running on two computers, both pointed at the same Dropbox folder. Both instances of Hazel are running the same set of rules. I have all my rules to trigger ONLY if the file name starts with zSCAN. Then I have scan snap drop the scan in the folder, but named with SCANSNAP. I have a rule in Hazel that says to rename SCANSNAP to zSCAN.

The solution seems to be to slow down dropbox. I restricted the upload and download rates to only 10 Kb per second. This gives Hazel a chance to process the zSCAN file before Dropbox uploads it to the other computer. By the time the other computer gets it, it's already renamed and processed.

Maybe not the best idea, but it seems to work most of the time.
Phantom27
 
Posts: 13
Joined: Mon Sep 09, 2013 11:08 pm


Return to Support