Page 1 of 1

Help with deleting downloaded file after opening

PostPosted: Fri Apr 27, 2012 8:07 pm
by mitchmeister
Hi

I'm trying to do something simple that used to work with 2.x but doesn't anymore with 3.x.

After downloading a specific file type I want a rule (or 2) to open the file in an app & then once it has been opened to delete the file. I used to do this with a single rule with 2 steps like http://cl.ly/GDbc but this doesn't work reliably anymore as it seems that sometimes the file is trashed before the app has got a proper hold of it.

So I broke it into 2 rules: First open the file & then delete the file once I'm sure the file has been opened http://cl.ly/GDkO. I have tried a number of different permutations on the condition "Date Added", "Date last opened", "Date created", but can't seem to get it to work.

Appreciate any advice.

Re: Help with deleting downloaded file after opening

PostPosted: Mon Apr 30, 2012 9:59 am
by Mr_Noodle
If it worked under 2.x, it was a fluke. When Hazel tells the app to open the file, there is no way for it to know that the app has finished. Hazel basically sends it off and continues.

Your best bet is to try using Date Last Opened. Something like date last opened is in the last x minutes or date last opened is after date last matched.

Re: Help with deleting downloaded file after opening

PostPosted: Thu May 03, 2012 11:34 pm
by mitchmeister
I tried http://cl.ly/GNbF & it doesn't work. Any other suggestions?

Re: Help with deleting downloaded file after opening

PostPosted: Fri May 04, 2012 11:57 am
by Mr_Noodle
How is it not working? Is it not throwing away the file at all or is it throwing it away too late? Also, check the date last opened on the file to make sure it's what you expect. It's possible it's not getting updated when the app opens it.

Re: Help with deleting downloaded file after opening

PostPosted: Sat May 05, 2012 4:24 am
by mitchmeister
Not working in that it doesn't move the file to the trash.

This is the file info - http://cl.ly/GOxZ

I still can't work out why this isn't working.

If I manually run the rules it moves the file to the trash.

A bug?

(incidentally this is the rule order - http://cl.ly/GPGL)

Re: Help with deleting downloaded file after opening

PostPosted: Tue May 08, 2012 2:47 pm
by Mr_Noodle
Looking at your rule again, you want it to be "NOT in the last 5 minutes". I think you want a delay before it starts throwing files away.

How does it look in the preview? I can't tell but it's possible it's matching the other NZB rule before it. There's a sticky thread about diagnostics that you should read as well.

Re: Help with deleting downloaded file after opening

PostPosted: Thu May 17, 2012 1:57 am
by mitchmeister
I finally got it to work with this logic

Image