Copy Some, Not All, Folders

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

Moderator: Mr_Noodle

Copy Some, Not All, Folders Wed Jun 26, 2024 10:44 am • by klind
I'm having a problem understanding how to copy most, but not all folders. I have many files in many folders. I want to copy all files, folders and sub-folders from the monitored folder except for two sub-folders. I have created many copy rules with various attempts to NOT copy these two named folders, but every time I run the rule it always copies everything including the two sub-folders I do not want copied.

I tried to do an image... Didn't work
klind
 
Posts: 64
Joined: Mon Jan 30, 2017 7:02 pm

Re: Copy Some, Not All, Folders Thu Jun 27, 2024 8:35 am • by Mr_Noodle
Use imgur.com to host images and link them here.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Copy Some, Not All, Folders Thu Jun 27, 2024 4:42 pm • by klind
klind
 
Posts: 64
Joined: Mon Jan 30, 2017 7:02 pm

Re: Copy Some, Not All, Folders Fri Jun 28, 2024 8:36 am • by Mr_Noodle
You understand your second rule copies everything, including folders? If you don't want it to do that, you should use a condition like "Kind is not folder".
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Copy Some, Not All, Folders Fri Jun 28, 2024 5:02 pm • by klind
Yes, I do understand... As stated I have tried a great number of permutations. While I know and believe Hazel can do anything as pertains to file manipulation, this particular situation alludes me.

I want to copy everything from the monitored level except two named folders and their contents. The problem is that the folder names I wish to exclude are sometimes repeated within other folders. I want these folders copied as long as they are not part of the two excluded monitored level folders.
klind
 
Posts: 64
Joined: Mon Jan 30, 2017 7:02 pm

Re: Copy Some, Not All, Folders Sat Jun 29, 2024 8:49 am • by klind
After a great amount of trial and error, I was finally able to accomplish something. My tests seem to indicate that the set of rules shown in the attached image get me there. I would appreciate it if you would take a look and tell me if there is anything smelly in which I might be stepping. Is there anything I am doing with this set of rules that may cause me trouble? Thanx...

https://imgur.com/a/2G8i246
klind
 
Posts: 64
Joined: Mon Jan 30, 2017 7:02 pm

Re: Copy Some, Not All, Folders Mon Jul 01, 2024 8:51 am • by Mr_Noodle
Still a bit confused as to what you are trying to do. Why not just copy the desired folders at the top level instead of going into each folder and copying their contents?
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Copy Some, Not All, Folders Mon Jul 01, 2024 4:04 pm • by klind
I would like that, but I have been unable to find a way to do that given my folder structure which I do not want to change.

There are two folders at the top level which I do not want to have copied. I do want everything else copied. However some of the other top level folders contain folders with the same name as the two top level folders I do not want copied. When I tell Hazel to not copy the two top level folders, Hazel also stops copying other folders of the same name that I do want to copy. I know this sounds complicated. Here's a kind of example showing folders only:

aaa
bbb
ccc

ddd
eee
...bbb
...ccc


I want to copy folders in green and not copy folders in red. The folders with ellipsis are sub-folders of folder eee.

It seems that whatever command I give Hazel I either get everything which I don't want or Hazel misses the sub-folders that happen to have the same name as the undesired top level folders which is also not what I want.

Mr Noodle, I love Hazel. Hazel is most likely the foremost application on my Mac and I highly recommend Hazel to everyone I know. It is just frustrating when I know Hazel can do something that, hopefully temporarily, alludes me.

Warm regards,
klind
 
Posts: 64
Joined: Mon Jan 30, 2017 7:02 pm

Re: Copy Some, Not All, Folders Tue Jul 02, 2024 8:37 am • by Mr_Noodle
Get rid of the subfolder rule. Just have the rules match the top level folders and copy them.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Copy Some, Not All, Folders Tue Jul 02, 2024 12:13 pm • by klind
:D OK... Guess I'm thinking too hard...
klind
 
Posts: 64
Joined: Mon Jan 30, 2017 7:02 pm


Return to Support