Page 1 of 1

Processing files in an iCloud folder

PostPosted: Thu Oct 31, 2019 5:47 pm
by notmarmite
I am using an app which creates audio files in a folder based on the date, and the files inside have a filename based on the time.

I want to move the files inside of the folder to somewhere else.

My problem is that if I do a condition of "Kind is Folder" and then "Data Added is after Date Last Matched" the file gets moved twice. I think it's because Hazel moves it when the file is created, and then file is re-written by the app when the dictation has finished. The file is being written to an iCloud folder and I suspect there's something weird in how iCloud syncs.

If I use any other match, then when the folder is created the rule runs, but when any files are added the rule does not run.

I tried to do a "delete enclosing folder" on the second action (the one that actually moves the file) but that's not an option in Hazel unless I run a shell process, and I'm really reluctant to do that (bad things will happen one day).

If I could do a "Wait 5 seconds" then we'd be fine too.

Any ideas on how to make this run reliably? Or do I have to live with the duplicates?

Re: Processing files in an iCloud folder

PostPosted: Fri Nov 01, 2019 10:05 am
by Mr_Noodle
You are matching the folder and not the file here. If you want to match the file, you need to have Hazel go into subfolders. Search the manual for the chapter on that.

Then your other rule should match attributes of the file (so do not use "Kind is folder").

Re: Processing files in an iCloud folder

PostPosted: Fri Nov 01, 2019 7:18 pm
by notmarmite
I was already doing that. I find I can't do much in Hazel without RTFM.

This is in the match the file script. Due to another issue, I found I was an old version of Hazel (4.3.5) and this problem went away when I upgraded to 4.4.1 Problem solved.

Thanks