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.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

automator - move files

I have a folder where various files end up. Based on the filename or extension I want to move these files to another folder with different subfolders. I made 5 different "Filter Finder Items" and "Move Finder Items" for this. When I activate one script, the relevant file is effectively moved to the correct folder. When I activate all 5 scripts nothing happens and all files just remain in the original folder. What am I doing wrong ?

iMac 21.5", macOS 10.15

Posted on Mar 19, 2020 7:58 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 19, 2020 12:37 PM

without seeing your workflow it's almost impossible to tell.


One thing to be aware of, though, is that the 'Filter Finder Items' action is additive - that is, if you have a workflow that looks like:


Get Specified Folder

|

V

Get Folder Contents

|

V

Filter Finder Items

|

V

Move Finder Items

|

V

Filter Finder Items

|

V

...


The second 'Filter Finder Items will work on the result of the previous step - in other words it will try to search within the subset of files identified by the previous 'Filter Finder Items' step.


This linear flow is an inherent flaw in Automator.


There are a couple of workarounds. The easiest is to store the top-level folder in a variable, and use that variable as the input to the Filter Finder Items:



In this model the folder is identified and put into a variable called 'Storage'.


Then the variable is used as the input to subsequent 'Get Folder Contents' and 'Filter Folder Items' actions.

Note also that the 'Get Value of Variable' option has the 'Ignore this action's input' option enabled. This is effectively what 'breaks the link' between the steps and starts anew.


If that doesn't help, please post back with more details of your workflow.

1 reply
Question marked as Top-ranking reply

Mar 19, 2020 12:37 PM in response to Filip Camerlynck

without seeing your workflow it's almost impossible to tell.


One thing to be aware of, though, is that the 'Filter Finder Items' action is additive - that is, if you have a workflow that looks like:


Get Specified Folder

|

V

Get Folder Contents

|

V

Filter Finder Items

|

V

Move Finder Items

|

V

Filter Finder Items

|

V

...


The second 'Filter Finder Items will work on the result of the previous step - in other words it will try to search within the subset of files identified by the previous 'Filter Finder Items' step.


This linear flow is an inherent flaw in Automator.


There are a couple of workarounds. The easiest is to store the top-level folder in a variable, and use that variable as the input to the Filter Finder Items:



In this model the folder is identified and put into a variable called 'Storage'.


Then the variable is used as the input to subsequent 'Get Folder Contents' and 'Filter Folder Items' actions.

Note also that the 'Get Value of Variable' option has the 'Ignore this action's input' option enabled. This is effectively what 'breaks the link' between the steps and starts anew.


If that doesn't help, please post back with more details of your workflow.

automator - move files

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