Basic sync recipe

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

Moderator: Mr_Noodle

Re: Basic sync recipe Mon Feb 03, 2014 4:29 pm • by Mr_Noodle
That is how sync is supposed to work. It creates an exact copy of the folder tree at another location. How do you want things to behave if a file is removed at the source?
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Basic sync recipe Tue Feb 04, 2014 1:00 pm • by Vlahn
Ahh, I see.

I was hoping that sync would be selective, and determine which specific files needed to be moved... and move just them.

Instead it determines a file has changed at source and then moves the entire folder structure including sub-files from the monitored folder downwards to the destination.. Overwriting every file along the way.

Sorry to be a pain and ask for a function that Hazel doesn't provide, Mr Noodle. I was hoping to avoid using another app to monitor folders, but I may have to :(
Vlahn
 
Posts: 7
Joined: Mon Sep 13, 2010 12:07 pm

Re: Basic sync recipe Tue Feb 04, 2014 5:18 pm • by Mr_Noodle
Well, depending to the answer of my previous question, there may be a way to do what you want.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Basic sync recipe Wed Feb 05, 2014 2:12 am • by Vlahn
As far as files at the source, if I delete something, I'm not particularly worried about whether the change is reflected at destination or if it continues to exist at the destination.

I really only want NEW files to be added from source to the destination while retaining the folder structure.
Vlahn
 
Posts: 7
Joined: Mon Sep 13, 2010 12:07 pm

Re: Basic sync recipe Wed Feb 05, 2014 2:59 pm • by Mr_Noodle
In that case, don't use the sync action at all. Create a rule to do the copy of new/modified files. In the options for the copy action, set it to copy over the folder structure from the monitored folder. Then add the rule to go into subfolders (see the sticky article at the top of this forum). That should basically do what you want.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Basic sync recipe Wed Jul 02, 2014 4:37 am • by simon_a
Mr_Noodle wrote:Here's a basic sync rule. It looks complicated but that's because it's very complete.

The first thing you should know is that if you want to sync a folder and all its contents, you need to have Hazel monitor the folder containing that folder you want to sync. Then you create a rule to match the folder you want to sync. In the rule I've attached, it matches against a folder named "blah". Change that to suit your situation.

The rule then matches if (a) the folder itself has changed or (b) any of its subfiles has changed. As a result, this will do a sync every time anything is modified. If it's a big folder tree, you may want to add a condition to do it less frequently, like "Date matched is not in the last 10 minutes", so that it doesn't bog things down. Alternatively, you can sync on a schedule using the Current Time attribute and get rid of all the conditions relating to date modified.

sync.hazelrules


EDIT (8/14/12): The older version of the rule had an error in it. Re-download if you downloaded it before.


I've downloaded the Basic sync recipe and can't get it to work, at all.
I've added BSR to the source folder I want to sync from - which is listed in the left hand pane of the Noodlesoft window - and have selected the DropBox folder I want to sync to at the bottom of the rule edit window and nothing happens when I run the rule. (There are files in the source folder).
simon_a
 
Posts: 6
Joined: Wed Jul 02, 2014 4:26 am

Re: Basic sync recipe Wed Jul 02, 2014 2:28 pm • by Mr_Noodle
Have you tried checking the preview to see if it matches?
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Basic sync recipe Wed Jul 02, 2014 4:18 pm • by simon_a
Thanks. I Have now; the Preview doesn't match. What should I try/do next?
simon_a
 
Posts: 6
Joined: Wed Jul 02, 2014 4:26 am

Re: Basic sync recipe Thu Jul 03, 2014 12:06 pm • by Mr_Noodle
If it doesn't match then apparently the date modified hasn't been updated. I suggest checking those files which aren't syncing and making sure the date modified makes sense.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Basic sync recipe Thu Jul 03, 2014 4:51 pm • by simon_a
Thanks Mr Noodle. There are 11 files in the fielder I'm trying to sync - 2 docx, 8 pdf's, 1 xlsx - and none are syncing. Each file has the same modified and last opened date which in most cases is also the same as the date created. In the instances where the created date is different it's one day earlier than the modified/opened date. Not sure what you mean by the date modified making sense. I've tried changing the date options on either side of the "is after" dialogue in the bottom half of the rule but that don't make the rule work; Preview doesn't show the rule matching. I'd send you screenshots but it would appear that I'm not tech savvy enough to work out how to do that either.
simon_a
 
Posts: 6
Joined: Wed Jul 02, 2014 4:26 am

Re: Basic sync recipe Fri Jul 04, 2014 3:10 am • by Jonzinator
Hello,

I am having a similar issue. I applied the rule to a folder with no results. The preview shows no matching files to sync.

How does the rule "Date last Matched" work? What constitutes being matched?

If I create the rule.....copy a file into the folder then activate the rule, will that file not be synced?

I know this is a robust rule and I have it running on several other folders without a problem. Just seems the newest folders I set up are not working.

I am also seeing: (A Document Being Saved By Hazelworker)

Thanks

Troy
Jonzinator
 
Posts: 4
Joined: Fri Jul 04, 2014 2:59 am

Re: Basic sync recipe Fri Jul 04, 2014 4:05 am • by simon_a
Hi,

I finally solved my problem; for me it was all about the folder depth of the folder I was trying to sync. The rule worked when the folder I wanted to sync was a direct sub-folder of the folder I had selected in the left hand side of the Hazel window - and was creating the rule in. Using the Basic Recipe folder "blah" needs to be in the folder the rule is based in. So my tree (?) is Macintoash HD | Users | Simon | Documents | blah. I added "Documents" to the Folders list on the LHS of the Hazel window and whamo, I was in business. (Had almost torn my hair out in the meantime, but happy now)
simon_a
 
Posts: 6
Joined: Wed Jul 02, 2014 4:26 am

Re: Basic sync recipe Fri Jul 04, 2014 1:59 pm • by Jonzinator
Thanks for the quick reply. Glad you got your workflow dialed in.

I am working on wrapping my head around how these rules work. Its not a language that makes sense to me.

I think my problem is that the rule "blah" specifies at the first rules is:
"Kind - is - Folder"

I need files to be included in that rule. Not just folder. How would I modify the rules to accomplish this?


Thanks

Troy
Jonzinator
 
Posts: 4
Joined: Fri Jul 04, 2014 2:59 am

Re: Basic sync recipe Fri Jul 04, 2014 3:43 pm • by simon_a
Hi Jonzinator,

The rule is set up to sync all the files and sub-folders (and their files) in folder "Blah" to another (destination) folder in a different location. As you add or remove files, etc in "blah" the same occurs in the destination folder. All you need to do is change "blah" to the name of the folder you want to sync. My problem was working out that the folder that this rule is based (nested?) in needs to be one level higher than (a parent folder of?) blah. So for me, based on my folder tree above, the rule sits in my Documents folder.

Hope this helps.
simon_a
 
Posts: 6
Joined: Wed Jul 02, 2014 4:26 am

Re: Basic sync recipe Fri Jul 04, 2014 3:56 pm • by Jonzinator
Thanks Simon,

Your reply got me looking at the rules again. I really wish these rules were written in more laymen terms.

I had to remove the first rule variable (Kind - is - Folder) This rule only allows folders to sync that are within the targeted folder.

Thanks again for your help

Troy
Jonzinator
 
Posts: 4
Joined: Fri Jul 04, 2014 2:59 am

PreviousNext

Return to Support