I try to implement an automatic ask for deletion of files in my download folder that were added more than X days ago.
I tried to implement an apple script to do that, and started with this script:
- Code: Select all
display dialog "Delete file " & theFile & " ?" buttons {"No", "Yes"} default button 2 with title "Hazel: Auto clean download folder" with icon file "System:Library:CoreServices:CoreTypes.bundle:Contents:Resources:FullTrashIcon.icns"
But so far, this doesn't work I get "Error executing apple script on the file" ?
Is it possible to achieve that task with Hazel ? Is the beginning of my applescript wrong ? Are there better ways to do that ?
Thanks,