Caching issue on re-import

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

Moderator: Mr_Noodle

Caching issue on re-import Mon Jul 31, 2017 7:25 am • by Sandro
I have a bunch of rules set up to process my Downloads folder. Most of them move the file somewhere and I would like to change the location those files go to. Due to the number of required changes (and to learn something for the next change in my setup) I'd like to avoid the GUI and do it via an export/import.

I have gone through below steps, but still see the old target definitions for the move command instead of my replaced ones. What am I missing?
Hazel 4.1.4

Regards

  • export rules of the Downloads folder
  • remove the Downloads folder from Hazel
  • convert exported plist to xml file
    Code: Select all
    plutil -convert xml1 myRules.hazelrules
  • find and replace the folder paths in that file
  • terminate HazelHelper and cfprefsd via Terminal
    Code: Select all
    sudo killall HazelHelper
    sudo killall cfprefsd
  • start Hazel
  • add the Downloads folder
  • import the changed .hazelrules file
Sandro
 
Posts: 20
Joined: Mon Jul 31, 2017 7:08 am

Re: Caching issue on re-import Mon Jul 31, 2017 11:05 am • by Mr_Noodle
The rules files are not meant to be edited directly. I'm surprised the rules didn't end up corrupted after that operation.

You will have to change the destination folders manually. Is there any commonality to these folders? If so, it might behoove you to instead of moving to each folder directly, moving to a common parent and then using Sort into Subfolder to sort into the individual folders. Doing it this way makes it so that you only have to modify one location should it change again.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Caching issue on re-import Mon Aug 07, 2017 7:42 am • by peelman
It may not be intended to be edited directly, but that doesn't mean it can't be done.

http://blog.peelman.us/post/11919704740 ... ter-moving

I found zero problems when I did it.
peelman
 
Posts: 1
Joined: Wed Oct 07, 2015 5:14 pm

Re: Caching issue on re-import Mon Aug 07, 2017 12:31 pm • by Mr_Noodle
Well, you are on your own when you do that. It can corrupt your rules so in the very least, make sure you keep good backups.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Caching issue on re-import Fri Sep 01, 2017 9:20 am • by Sandro
I got it now. I saw, that there is a syncing option as well. I figured, that if a re-import from a changed sync file doesn't work, then what does? :-D From there it unfolded...

Summary of what works:
Export rules, convert to xml format as described above, make your chances, convert back to binary and then re-import. I was missing the convert back to binary step before. That works fine. Problem with that though is, that all the rules are re-imported.

Back to my sync folders scenario. The sync file is clearly similar, but not identical to what you get with a manual export. Here the converting to xml step doesn't work for some reason, though. Any clue why that is?

What you can do though is to overwrite the sync file with the changes you made to the manual export (after converting back to binary). Then only the changes are re-imported.

Can anyone understand what I am trying to say? I guess, it should at least give some clues for people in similar situations :-)

Sandro
Sandro
 
Posts: 20
Joined: Mon Jul 31, 2017 7:08 am


Return to Support