Page 1 of 1

Moving certain files & folders

PostPosted: Mon Mar 18, 2013 10:29 am
by FatherOfAlways
Hi,

I would like to set up a rule in Hazel and I need help.

I have a folder, let's call it "Folder", inside of which there are three folders, lets call them "Subfolder 1", "Subfolder 2" and "Subfolder 3". I often drop random files & folders into "Folder".
I would like to create a rule that would take all the files & folders I drop into the "Folder" and move them somewhere, but NOT move folders "Subfolder 1", "Subfolder 2" and "Subfolder 3" as well.
How would I go about creating that rule?

Re: Moving certain files & folders

PostPosted: Mon Mar 18, 2013 11:26 am
by a_freyer
Code: Select all
if (all) of the following conditions are met for (the file or folder being processed):
     name is not Subfolder 1
     name is not Subfolder 2
     name is not Subfolder 3

Do the following to the matched file or folder:
     …


Or

Code: Select all
if (all) of the following conditions are met for (the file or folder being processed):
     kind is not folder

Do the following to the matched file or folder:
     …

Re: Moving certain files & folders

PostPosted: Tue Mar 19, 2013 8:03 am
by FatherOfAlways
Thank you for your reply. However, your solutions do not work.

I tried the first one myself, but for some reason it moved all the files and even "Subfolders 1, 2 & 3". I don't know why...

The second one would work for the files, but occasionally I drop a folder in the mix and would like for Hazel ro move that one too, which this rule would not allow.

Maybe I should also mention the destination folder or the folder I'm moving all the files & folders to is a subfolder inside a folder "Subfolder 1". I doubt that matters, but if it does, now you know.

Anyway, do you have any other suggestions?

Re: Moving certain files & folders

PostPosted: Tue Mar 19, 2013 9:37 am
by a_freyer
The first solution does work. Post your rule so we can find the mistake.

Re: Moving certain files & folders

PostPosted: Tue Mar 19, 2013 2:16 pm
by FatherOfAlways
Before:
Image

After:
Image

My rule:
Image

Re: Moving certain files & folders

PostPosted: Tue Mar 19, 2013 3:49 pm
by a_freyer
Try modifying to "name does not contain" to exclude the possibility of typos.

Re: Moving certain files & folders

PostPosted: Tue Mar 19, 2013 5:12 pm
by FatherOfAlways
Nope. It didn't help...

Re: Moving certain files & folders

PostPosted: Tue Mar 19, 2013 5:15 pm
by a_freyer
Have you tested the rule preview window?

There isn't any obvious reason why this shouldn't work.

Re: Moving certain files & folders

PostPosted: Tue Mar 19, 2013 5:19 pm
by FatherOfAlways
Oh! I changed the names of my folders by just dropping the ".0" part and now everything works fine.
Weird...

Re: Moving certain files & folders

PostPosted: Tue Mar 19, 2013 5:22 pm
by a_freyer
You know what? I bet Hazel was interpreting that period as a file extension delimiter. That's why it wasn't working! I probably should have seen this earlier!

Glad you figured out the problem.