Sync folder structure but only changed files not full folder

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

Moderator: Mr_Noodle

Hi

I'm trying to sync only the changes from folder A to folder B.

Let's say I have a structure like this:

Folder A
- file A.1
- file A.2
- Sub-folder AA
- file AA.1
- file AA.2
- file AA.3

If I modify file AA.1 within sub-folder AA, *all* the files in sub-folder AA get synced across, not just file AA.1. Is there any way around this?

I've read the page on Syncing Folders and used the template rule as well as tried variations on it. Reading that page, I was under the impression only changed files would be synced across but I'm guessing because a changed file changes the last modified date of the folder it's in, that makes Hazel thing the whole folder needs syncing.

Is there an easy way around this? TIA.
logorrhoea
 
Posts: 3
Joined: Sun Jan 22, 2023 8:29 am

Can you show evidence that it's syncing unnecessary files? Even if a folder is updated doesn't necessarily mean all the files in it are as well.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Here's what's happening. Hopefully you can follow the steps ok.

Edit: Can't get the image to appear inline, so here's the link: https://www.dropbox.com/s/5c2u55srpgb67 ... 20sync.png
logorrhoea
 
Posts: 3
Joined: Sun Jan 22, 2023 8:29 am

Syncing means that the source and destination are identical. When you remove files at the destination, that causes things to re-sync. Also, your rule conditions only catch stuff at the top level. If you look at the rule in the chapter on folder syncing, you can see that it's more involved than that.

If you only want changed files to be copied over (not synced), then that is a very different problem. Instead you should have something like two rules:

Rule 1: Copy files over if modified. Should not match folders. Copy action set to copy over folder structure.
Rule 2: Rule to go into subfolders (see manual on this).

You may need to tweak the above to match what you are looking for.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Ah, ok. Sorry, I misunderstood the sync feature.

Just tried the two rules suggested and it does exactly what I need.
logorrhoea
 
Posts: 3
Joined: Sun Jan 22, 2023 8:29 am


Return to Support