Page 1 of 1

How to Work with Nested Folders

PostPosted: Fri Jan 19, 2018 4:18 pm
by slowappreciation
I am trying to use Hazel to organize files into a new folder by date, but am having some issues. Right now, I have a parent folder with ~100 subfolders organized by category. Within those subfolders, there is one individual file per year, and the date is in the file name. This is the standard naming convention.

Current Structure:

    Parent Folder

      Subfolder A
        2015 File A
        2016 File A
        2017 File A

      Subfolder B
        2015 File B
        2016 File B
        2017 File B

      Subfolder C
        2015 File C
        2016 File C
        2017 File C


I would like to create a folder for each year, and then have the respective files for that year show up in it. So it would look something like this:

Desired Structure:

    New Parent Folder

      Subfolder 2015
        2015 File A
        2015 File B
        2015 File C

      Subfolder 2016
        2016 File A
        2016 File B
        2016 File C

      Subfolder 2017
        2017 File A
        2017 File B
        2017 File C

Is this possible? It seems like the nested folders is a problem, as I don't have one folder with every single file already in it—instead, it's already organized by subfolder. I'm sure there must be a way around it though?

Re: How to Work with Nested Folders

PostPosted: Mon Jan 22, 2018 9:55 am
by Mr_Noodle
Search the manual for "subfolders". That will show you how to get Hazel to go into subfolders.

You'll then have to use matching (search for "match patterns") to grab the year out of the filename and use that to re-sort.