How do I file screenshots?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

How do I file screenshots? Thu Jul 28, 2016 5:50 am • by mdavis1982
I've been trying to do this for a few days, but I can't quite get it to work :-(

Here's what I want to do:

1. When I take a screenshot on my Mac, I want to file it in a folder on my Desktop called "Screen Shots" (which may or may not exist)

2. When a screenshot in that folder is older than 1 hour, I want to move it to the trash

3. When the "Screen Shots" folder on my Desktop is empty, I want to delete it

This seems trivial, but I can't for the life of me get it to work. Here is what I have currently:

Folder in left Sidebar: Desktop

Rule 1: File Screenshots
If (all):
Name contains "Screen Shot"
Kind is Image

Sort into Subfolder with pattern "Screen Shots"

Rule 2: Remove Screen Shots Folder
If (all):
Kind is Folder
Name is "Screen Shots"
Size is 0 bytes

Move to folder "Trash"

Rule 3: Run Rules on Screen Shots Folder
If (all):
Kind is Folder
Name is "Screen Shots"

Run rules on Folder Contents

Rule 4: Remove Old Screenshots
If (all):
Name contains "Screen Shot"
Date Created is not in the last 1 Hour

Move to folder "Trash"

For whatever reason, this set up of rules doesn't do what I need.

Can anyone help?

Thanks!
mdavis1982
 
Posts: 3
Joined: Thu Jul 28, 2016 5:43 am

Re: How do I file screenshots? Thu Jul 28, 2016 10:53 am • by Mr_Noodle
Try using the status interface (the "eye" button) to preview your rules. You'll probably find that some rules are matching instead of the one you want. I'm guessing rule 1 is matching in cases where you want rule 4, for instance.

Also, to detect an empty folder, it's better to use Sub-file/folder count as, because of hidden files, the size may not be 0.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: How do I file screenshots? Thu Jul 28, 2016 11:15 am • by mdavis1982
I still can't get it to work at all.

I've tried the sub-file/folder count option and it removes the entire directory before it's deleted old screenshots.

Can anyone give me a recipe to make this work?
mdavis1982
 
Posts: 3
Joined: Thu Jul 28, 2016 5:43 am

Re: How do I file screenshots? Thu Jul 28, 2016 4:29 pm • by Mr_Noodle
Can you post the current state of your rules? Not sure how it's deleting folders with files in them still.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: How do I file screenshots? Fri Jul 29, 2016 5:17 am • by mdavis1982
Sure thing.

Here are my rules as they are currently set up:

Rule 1: Run Rules on Screen Shots Folder

Rule 2: Remove Old Screen Shots

Rule 3: File Screenshots

Rule 4: Remove Screenshots Folder

Currently, the time delay is set to 1 minute (so that I can test quickly). If I take a bunch of screen shots spread out over a minute, they get filed into the correct place, but then the whole folder gets deleted, rather than each screen shot one by one as I would expect.

I really really want to love Hazel - I can think of so many uses for it. But this is my first experience trying to create a workflow and so far it hasn't been particularly smooth :(
mdavis1982
 
Posts: 3
Joined: Thu Jul 28, 2016 5:43 am

Re: How do I file screenshots? Fri Jul 29, 2016 12:47 pm • by Mr_Noodle
I think the problem is that rule 2 also matches the screenshot folder, which has a similar name. You need to add a condition to match images (or match non-folders) there.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support