You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

automator setup question

Hi,

I face one condition which is about automator. I designed one trigger folder condition, it can run successfully manually, but when I setup with folder, it can not automatically run. During run it manually , it did not show any error message.



Posted on Oct 18, 2024 7:01 AM

Reply
5 replies

Oct 18, 2024 9:05 AM in response to show0116

Please describe what you are trying to accomplish with Automator.


From your example it looks like you are triggering the Automator actions when changes to the downloads sub-folder occur and executing a Unix find command which just seems to list everything and then you have a Move Finder items to Trash. The items being returned are not Finder items so they aren't deleted. The bash script runs lists the files and then closes and nothing is being deleted. You might wish to delete the files using more Unix commands in your bash script. But do be cautious while testing as the files won't go to the trash can.


Did you know there is an option to empty the trash items that are older than 30 days? Search for Storage in System Settings. Empty Trash Automatically.




Oct 18, 2024 11:22 AM in response to James Brickley

James Brickley wrote:

Please describe what you are trying to accomplish with Automator.

From your example it looks like you are triggering the Automator actions when changes to the downloads sub-folder occur and executing a Unix find command which just seems to list everything and then you have a Move Finder items to Trash. The items being returned are not Finder items so they aren't deleted. The bash script runs lists the files and then closes and nothing is being deleted. You might wish to delete the files using more Unix commands in your bash script. But do be cautious while testing as the files won't go to the trash can.

I would have thought as much, but surprisingly I made a similar Automator workflow as a test.

As you noted, the shell script outputs lines that happen to represent file paths; the subsequent "Move to Trash" action DOES move said files to the trash!


This workflow apparently is to be set as a folder action, with the purpose of deleting files that are added to the folder. It seems to me that this could do without the find command, but perhaps the OP can clarify what is the intended purpose of the workflow, I could be missing something.

automator setup question

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.