Page 1 of 1

Delete files from a folder that are NOT in another folder

PostPosted: Tue Mar 10, 2020 7:59 pm
by BenW
I've searched, so if this info is already available please point me to it.

Want to compare 2 folders, remove the files from Folder A that are not in Folder B. (Name matching will be sufficient, but comparing contents is best.)

This is because Mac smart folders (searches) don't work with the syncing folders with delete technique found here https://www.noodlesoft.com/manual/hazel ... g-folders/

So I setup a 1-way sync from the smart folder to destination, which does a good job of adding to the destination.

I want to setup a separate rule that will check the "destination" folder for any files that are not in the "source" folder (smart folder) and delete them from the destination.

Thanks for the help. Hazel is really a great tool!

Re: Delete files from a folder that are NOT in another folde

PostPosted: Wed Mar 11, 2020 10:06 am
by Mr_Noodle
You may need to come up with a script to do that type of logic. Either that, or have rules at the destination that mimic what the Smart Folder filters on, removing whatever doesn't match those filters.