Merge Folders

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

Moderator: Mr_Noodle

Merge Folders Fri Apr 11, 2014 2:19 pm • by a2l2
I tried to merge the contents of two folders. I use (and bought for that reason) Hazel to organize my Dropbox folder. Some apps just save their files where they like it - and that is, what I don't like. So I created a small rule: If 1. Kind -> Folder and 2. Name "ScannerPro" then Move to "Dropbox/Apps". The problem started, when the rule had run the second time and the folder "ScannerPro" did already exist. Either the new folder will be renamed or the original folder will be deleted and replaced by the new folder. Both options are clearly not what I want. Apparently is not supported to merge the content of two folders. I tried a workaround, but this is - imo - not the way it should be. Hazel should support that naturally.

The workaround: On the Dropbox folder: If 1. Kind -> Folder and 2. Name "ScannerPro" then Move to "Dropbox/Apps/ScannerPro/". There is now a folder "ScannerPro" within "ScannerPro".
On the folder Dropbox/Apps/ScannerPro: First Rule: If Kind is Folder -> Run rule on folder contents; Second Rule: If kind is any file -> move to "Dropbox/Apps/ScannerPro"; Third Rule: If Kind is Folder and Size is 0 then move to trash.

Clearly, it could be way easier, if Hazel would support an option like "If folder exists: Merge folder contents".
a2l2
 
Posts: 1
Joined: Fri Apr 11, 2014 1:56 pm

Re: Merge Folders Fri Apr 11, 2014 2:54 pm • by Mr_Noodle
Thanks for the suggestion but the problem with merging folders is that it is more suited for interactive use. I could have options like there are now for moving/copying to specify whether to replace or renumber or whatever, to get around conflicts, but things also get messy with when a part of the operation can't be completed. With a regular copy/move of a whole folder, it's for the most part, all or none and that is easy to pull of. With a merge, there may be cases where a part of the operation can't be completed so then it comes down to whether you back out the operation and try and restore the original state of both folders or you just leave it in its messed up state or you continue with certain files mysteriously not merged/copied over.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support