Move all files to folder root & sort into subfolder of kind

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Good morning,

I hope you will be able to help me.
I have looked on the forum a way to try that, but I am a bit lost.
I started with this post viewtopic.php?f=2&t=1531
but it recreates subfolders if the depth is higher than one...

The forum is so big and varied that i can't really find what I want.

Basically I have client folders, with different subfolders and files in them.

Code: Select all
Folder
    Subfolder
        Subfolder
              Files.psd
              Files.img
              Files.3d
              Files.ai
        Subfolder
        Files.png
        Files.jpg
        Files


I would like to find a way to bring all the folder/subfolder content to the root of the Folder

Then apply rules to all the files to sort them ( I think this one should be easy...) So my folder is now clean like that.

Code: Select all
Folder
    Subfolder Img
        File.png
        File.png
        File.png
        File.jpg
        File.jpg
        File.jpg
    Subfolder psd
        Files.psd
        Files.psd
    Subfolder 3d
        File.3d


So far with the first post / I managed to do it with one level of depth, using the move to enclosing folder function
but obviously if it is deeper, it creates the subfolders in that folder.
Also I don't know how to prevent the rule applying when it has been sorted.
I have used tags with
Code: Select all
IF DO NOT CONTAIN TAG
but then it prevents all rules from working.

If someone has the patience to help I would really appreciate it.

PS : I know it is a bit like i am asking someone to clean my room :lol:

Thanks

Ed
Edwardbattistini
 
Posts: 4
Joined: Thu Nov 12, 2015 5:46 am

I'm not quite following. You just want all the files under "Folder"? If so, the post by ecormany should work. Use the (fixed location) solution, not the (push upwards).
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thank you Mr_noodle for your response.
I am still a bit confused though...

More precisely : I have several messy folders with files and subfolders. I want them to be resorted into subfolders of kind. ( all images in one folder, all psd in another, all pdf in another and so on... )

I Assumed the easiest way would be to do :

1- bring all files to the root of the ruled folder
2- create a rule for each kind of file ( if this kind of file then sort into subfolders Kind )
3- stop the rule to apply on created folders.

But I can't make it work. and as i have like 200 folders, I was hoping to have a way to apply it to many different messy folder at once... I will try again
Edwardbattistini
 
Posts: 4
Joined: Thu Nov 12, 2015 5:46 am

Here is the rule I have created

https://www.dropbox.com/s/hd4f4uaxz3rt014/test.hazelrules?dl=0
and the folder sample I am using to test
https://www.dropbox.com/s/x1f4lk34lrdm1v8/test.zip?dl=0

Somehow, It aborts the next rules after bringing all the files to the folder root

I you have an idea...
Edwardbattistini
 
Posts: 4
Joined: Thu Nov 12, 2015 5:46 am

One thing to note is that your last rule won't ever fire because the 2nd rule will match every folder (thus never getting to the last rule). Have you tried using the preview? I would make heavy use of that to make sure your rules are set up as expected.

Also, it might be easier if you use a whole separate other folder for the destination instead of trying to reorganizing things in place.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thank you for your last point Mr_noodle. I will try doing this by creating a new folder...
And the preview feature i am not sure how to read it...

I will try more anyway.

Thanks
Edwardbattistini
 
Posts: 4
Joined: Thu Nov 12, 2015 5:46 am


Return to Open Discussion

cron