How to move a file after some time it has been opened?

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

Moderator: Mr_Noodle

Greetings,
I've set up a rule that look for .dmg files into a folder, and, if it has been opened, after some time Hazel move it to the trash.

Alas the rule trashes the file as soon as I download it.

How do I solve it?

I've tried by using last opened "is before" and "is not in the last", but I wasn't able to solve.

Thank you!
IvanPsy
 
Posts: 26
Joined: Thu Jul 14, 2022 3:38 am

Select the file in Finder and do "Get Info". Make sure there is a "Last opened" date set (it should be under "More Info").
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Select the file in Finder and do "Get Info". Make sure there is a "Last opened" date set (it should be under "More Info").


No "Last opened" date set when I download the DMG from the website.
It appears after I have opened it, of course, but it's too late because Hazel trashes it the moment the file is downloaded.

So how do I make Hazel trash it only after the file has been opened?
Is it possible?
How?
Maybe some workaround?

Thank you.
IvanPsy
 
Posts: 26
Joined: Thu Jul 14, 2022 3:38 am

Your rule is matching the newly-downloaded file because the blank last-opened-date matches the condition you've set.

You'll need to change to filter out the blank last-opened-date. In other words, for instance:

If all of the following conditions are met
Kind is Disk Image
Date last opened is not blank
Date last opened is not within last 1 day

Note that the order of those conditions is important — if the second one is false, which it should be for a file you've just downloaded, then the rule won't match.

I hope that helps, I know I've had similar situations where it took me a while to work out why the rule was running when I didn't want it to.
AlanRalph
 
Posts: 3
Joined: Fri Mar 18, 2016 10:58 am

AlanRalph wrote:Your rule is matching the newly-downloaded file because the blank last-opened-date matches the condition you've set.

You'll need to change to filter out the blank last-opened-date. In other words, for instance:

If all of the following conditions are met
Kind is Disk Image
Date last opened is not blank
Date last opened is not within last 1 day

Note that the order of those conditions is important — if the second one is false, which it should be for a file you've just downloaded, then the rule won't match.

I hope that helps, I know I've had similar situations where it took me a while to work out why the rule was running when I didn't want it to.


Done, let's see how it works.
Thank you!
IvanPsy
 
Posts: 26
Joined: Thu Jul 14, 2022 3:38 am


Return to Support