Copy/Backup everything in a folder when a file changes

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

Moderator: Mr_Noodle

I searched on the forums for this but didn't really find what I was looking for.

Is there a way to make Hazel copy all of the files/subfolders/subfolderfiles, when a file changes in the rule folder?

I.e. copy the entire folder structure and its contents, when a file is updated – not necessarily just when it is created.

I tried the rule in the screenshot, and while it seemed to copy some subfolders and their contents to a Dropbox folder (iMac) with sorting to subfolder with date, it did not copy all the files in the folder.

Image

In case you were wondering, I'm trying to make automatic backups to Dropbox when my configuration files for BetterTouchTool changes.
bonn
 
Posts: 12
Joined: Sun Oct 16, 2016 5:18 am

If I'm understanding you correctly, you want to copy a folder if any file under it has changed? Do you actually need to perform the copy every time or are you just trying to mirror a folder to another location? If the latter, then see this thread on how to use the sync action to do that: viewtopic.php?f=4&t=1593#p6500
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:If I'm understanding you correctly, you want to copy a folder if any file under it has changed? Do you actually need to perform the copy every time or are you just trying to mirror a folder to another location? If the latter, then see this thread on how to use the sync action to do that: viewtopic.php?f=4&t=1593#p6500


Hi MrNoodle, that's correct – I want to copy the folder and/or its files to a location whenever any file in it changes.
I don't edit the files often, so I would like to perform the copy every time.

From importing the Hazel rule attached in your forum link, I did however try a fusion of Syncing to a mirroring folder, like the rule already does, but also adding subsequential rules to Archive and then Sort into Subfolder (by current date).

Unfortunately, it didn't work that way. I thought adding sequential rules after Sync would perform the actions on the synced files, but instead it zipped and subsorted the files in the original folder.

Is there a way to make the subsequent rules after Sync happen on the synced files instead of the original files?
bonn
 
Posts: 12
Joined: Sun Oct 16, 2016 5:18 am

You can't do that with that rule since it is set up to match the whole folder. Even if you set up the rules to sync individual files, the archives will be a bunch of individual archives for each file, which I am guessing is not what you want.

To get an archive of only the sync files, you'll have to set up a rule to match the files, copy them into a new folder, then have another rule archive that folder.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support