New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule ignoring «contains: screenshot» #176
Comments
Just tried it and cannot reproduce. Are you sure there are screenshot files in the given location? |
I really don't wish to enable subfolders, because this would mean applying the rule on other screenshots located in subfolders (which I don't need to process). Note: even enabling subfolders, it won't work either. |
What is the output of |
Of course if I do:
It lists all the folders and files in there. Note: I have other rules targetting other files in the same folder which work. |
This is very strange, works perfectly here. Really cannot explain it so far. ❯ tree ~/Desktop/issue-\#176
/Users/tf/Desktop/issue-#176
├── Screenshot1.jpg
├── abcScreenshotabc.jpg
├── abcscreenshot.jpg
└── screenshot.jpg
0 directories, 4 files
❯ organize sim .configs/28-issue-176.yaml
organize 2.0.8
Config: ".configs/28-issue-176.yaml"
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ SIMULATION │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
⚙ move screenshots to temp folder ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
/Users/tf/Desktop/issue-#176
abcScreenshotabc.jpg
- (move) Move to /Users/tf/Pictures/album/TEMP/abcScreenshotabc.jpg
screenshot.jpg
- (move) Move to /Users/tf/Pictures/album/TEMP/screenshot.jpg
Screenshot1.jpg
- (move) Move to /Users/tf/Pictures/album/TEMP/Screenshot1.jpg
abcscreenshot.jpg
- (move) Move to /Users/tf/Pictures/album/TEMP/abcscreenshot.jpg
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ SIMULATION │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
success 4 / fail 0
❯ cat .configs/28-issue-176.yaml
rules:
- name: "move screenshots to temp folder"
locations: "~/Desktop/issue-#176"
subfolders: false
enabled: true
filters:
- extension:
- png
- jpg
- jpeg
- name:
contains: screenshot
case_sensitive: false
actions:
- move:
dest: "~/Pictures/album/TEMP/"
on_conflict: rename_new
rename_template: "{name}_{counter}{extension}" Which OS + version are you on? |
Now I see the problem. This rule is conflicting with another one (which comes later in the YAML, which is strange, because I thought the processing was sequential). When I comment it out, it works fine. Otherwise, it returns |
I forgot to answer the OS version earlier: rules:
- name: "/CAMERAROLL > TEMP {SCREENSHOTS}"
locations: '~/OneDrive/Pictures/Camera Roll/'
subfolders: false
enabled: true
filters:
- extension:
- png
- jpg
- jpeg
- name:
contains: screenshot
case_sensitive: false
actions:
- move:
dest: "~/Pictures/album/TEMP/"
on_conflict: rename_new
rename_template: "{name}_{counter}{extension}"
# ----------------------------------------------------------------------------------|
- name: "/CAMERAROLL > TEMP {IMAGES}"
locations:
- path: '~/OneDrive/Pictures/Camera Roll'
exclude_files: ['*Screenshot*.*', '*screenshot*.*'] # <---- if commented, it works.
subfolders: false
enabled: true
filters:
- extension:
- jpg
- png
- jpeg
actions:
- move:
dest: "~/Pictures/album/TEMP/"
on_conflict: rename_new
rename_template: "{name}_{counter}{extension}" If the line |
That's a bug! And a strange one. I'll look into this 👌👌 |
Should be fixed in v2.0.9! Thanks for reporting and for the detective work! |
Fantastic work, thanks. This issue is fixed. I have another one for which I will open a new issue. |
This rule ignores any screenshot files in the pertinent folder.
Maybe somebody can see where the error is?
I need the rule to target any file whose filename contains
screenshot
.The text was updated successfully, but these errors were encountered: