Page 1 of 1

Syncing Exact Folder Structure

PostPosted: Wed Mar 24, 2021 1:40 pm
by hankmaldanodo
Hello everyone, and thank you in advance for your patience and help.

I've been "noodling" around with Hazel for the past day, and for the life of me I cannot figure out how to make my rules work exactly how I want. Here is what I'm trying to accomplish:

When new music files or folders of music are dropped into directory "A":

- Tag music files "Music" (successfully done) Image
- Run rules on enclosing folders (successfully done) Image
- Sync those new files and folders to another volume (virtual drive and NAS)

Every sync operation I set up not only syncs the folders and their contents, but it takes the files out of those folders syncs them to the root level of target directory "B." I think this is a result of the "Run rules on folder contents" rule.

UPDATE

After some more tinkering...

This rule will sync the folders and its subfolders, but it won't sync newly added files or folders. The "Date Modified" shows a very old date (probably from when the file was originally created), and the "Date Added" field is blank. So using the "If" condition to check for Date modified after Date last matched won't work. How can I have it live sync newly added files and folders?
Image

With this rule, I'm trying to sync individual files in the root of the monitored folder. But, it pulls all the music files out of all of the folders and moves them to the target folder. How do I fix this so that it only pulls individual music files in the root of the monitored folder?
Image

Monitored Folder:
Image

Target Folder (note how all the mp3s from the folders are copied to the root):
Image

Re: Syncing Exact Folder Structure

PostPosted: Thu Mar 25, 2021 10:01 am
by Mr_Noodle
There's a chapter in the manual dedicated to syncing/mirroring a folder. I suggest checking that out.

Re: Syncing Exact Folder Structure

PostPosted: Thu Mar 25, 2021 12:24 pm
by hankmaldanodo
Mr_Noodle wrote:There's a chapter in the manual dedicated to syncing/mirroring a folder. I suggest checking that out.


Thanks. I have already studied this extensively, which is why I’m asking for a little help.

I got the first actions working. But I don’t want to sync just the files. I want to keep them organized the way they are in the monitored folder when they sync over.

Re: Syncing Exact Folder Structure

PostPosted: Fri Mar 26, 2021 9:36 am
by Mr_Noodle
That's why you sync the whole folder, not the files.

Re: Syncing Exact Folder Structure

PostPosted: Fri Mar 26, 2021 10:06 am
by hankmaldanodo
Mr_Noodle wrote:That's why you sync the whole folder, not the files.


Ok, so what am I doing wrong?

If I take the “Sync individual files” rule off, it won’t sync individual files that aren’t in folders.

Re: Syncing Exact Folder Structure

PostPosted: Mon Mar 29, 2021 10:14 am
by Mr_Noodle
Did you read the part about having Hazel monitor the folder above the folder you want to sync? That part is critical.