tfeldmann/organize

Copy folder structure from parent folder, monitored folder, or root folder

nothing2obvi opened this issue · 4 comments

Is your feature request related to a problem? Please describe.
Sometimes I want to copy or move certain file extensions from a folder to another folder but keep the same folder/subfolder structure. I'm not sure how to currently do this in Organize.

Describe the solution you'd like
Allow copying or moving certain files while keeping the same folder/subfolder structure, similar to Hazel.

Screen Shot 2024-05-05 at 1 57 35 PM

Describe alternatives you've considered
My alternative is Hazel. I've already made the switch to Organize for most tasks, but this feature is something I'm only able to do in Hazel at the moment.

Have a look at the {relative_path} variable:

rules:
  - locations: "/test"
    subfolders: true
    filters:
    - name:
        startswith: file
    actions:
    - copy: "/dest/{relative_path}

Does this work for you?

EDIT: I think organize supports all the hazel options:

Warning this is untested! Simulate first.

  • from monitored folder -> dest/{relative_path}
  • parent folder only -> dest/{path.parent.name}/
  • from root -> dest/{path}

Oh wow, thanks! I will try it out when I have time and report back.

I tried from monitored folder and it was successful. Thank you. Haven't gotten to try the others yet.

Congrats 👍 Closing the issue then