-
-
Notifications
You must be signed in to change notification settings - Fork 169
-
I can't seem to get it to work; I've tried not name:, not contains: and several other variants, but none seem to work - what am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments 2 replies
-
I realize that this is a month late. If you're still trying to sort it out (or for those that find this question in a Google search), you need to use the "exclude_dirs" option described on this page:
Beta Was this translation helpful? Give feedback.
All reactions
-
I had forgotten about this. Yeah, I found you can do it with the following syntax:
rules: - name: "Sorting documents in \"documents\"" locations: - path: "documents" exclude_dirs: ['github', 'variety', 'dotfiles', '.config', '.local'] subfolders: true filters: - created - name - extension: *doc actions: - echo: "{path}" - move: "documents/{created.strftime('%Y')}/{created.strftime('%m')}/{created.strftime('%d')}/{extension.lower()}/{name | replace(' ', '_') | lower()}.{extension.lower()}"
I noticed that with the following setup, though, you cannot declare multiple dirs in path.
Beta Was this translation helpful? Give feedback.
All reactions
-
the "no multiple dirs" is a deal breaker :(
Beta Was this translation helpful? Give feedback.
All reactions
-
I struggle with skipping directories as well. Taking the example from above I might have:
documents/.config
documents/subdir/.config
documents/othersubdir/.config
documents/othersubdir/test/.config
If I just want to exclude documents/othersubdir/.config how can I do that?
rules:
- name: "Sorting documents in \"documents\""
locations:
- path: "documents"
exclude_dirs: ['documents/othersubdir/.config']
subfolders: true
or
rules:
- name: "Sorting documents in \"documents\""
locations:
- path: "documents"
exclude_dirs: ['othersubdir/.config']
subfolders: true
does not work in my case.
Beta Was this translation helpful? Give feedback.
All reactions
-
filters: - not mimetype: "inode/directory"
This might work
Beta Was this translation helpful? Give feedback.