Automator copy file type from one folder to another not working

I am attempting to copy a specific file type from one folder and copy them into another folder. In Automator I create a workflow using Folder actions and I 1) Set the Folder Actions receives files and folders added to "Source Folder", 2) Use Get Specified Finder Items action and add the source folder 3) Use the action Find Finder Items and search the source folder for All and tried Any File Extension, Is, "FILE TYPE" with no period, and finally use the action Copy Finder Item to a folder I added to the Downloads folder.

Every time I run the Automator workflow I created it will copy the entire source folder and all of its content. I need it to just copy the ones I specified the extension of the file. Can someone tell me where I am going wrong?


Thanks!

Mac mini 2018 or later

Posted on Jul 14, 2022 06:39 AM

Reply

Similar questions

6 replies

Jul 14, 2022 07:13 AM in response to Eddie100770

All this needs to be is a two-action Folder action, where the source folder and destination folder are unique destinations and the destination folder must not be contained within the source folder.


Here is an example using two folders on my Desktop: 1) Foo (source) and 2) WIP (dest). I drop a PDF document onto Foo, and it is copied into WIP. You might want to set the Replacing existinf files on the destination folder if you don't want Finder interrupting your workflow with these:



The Folder Action workflow that I am using:


Jul 14, 2022 09:35 AM in response to Eddie100770

I am confused by your description:


> 1) Set the Folder Actions receives files and folders added to "Source Folder"


makes sense - the workflow automatically gets presented with a list of files and folders added to the source folder.

Side issue, not sure why you use 'Files and Folders' if you're just looking for a File, but that may be a separate question.


> 2) Use Get Specified Finder Items action and add the source folder


What? Why? you already have the items passed into your script. Why do you feel the need to Get the source folder again?

Ostensibly, this will override the list of files added to the folder and reset the script to run on a potentially different set of source files.


Ultimately, it isn't entirely clear what your script is trying to do. It would help if you posted a screenshot of your workflow since often subtle details are missed when you try to explain what you think it's doing vs. what it's actually doing.


Also, as Viking hinted, this may be doomed to failure if the destination folder is a subfolder of the source folder. You'll need additional logic added to the script if this is the case.

Jul 15, 2022 06:20 AM in response to VikingOSX

Thanks for confirming for me VikingOSX. I spent an hour on Apple text working with someone but after an hour attempting basic tech101 she said it might be the software and needed to contact their tech support. When I told her it was an Apple product that comes standard with all Mac OS she was shocked and assigned me to a senior Apple rep. I need to reach out to them today.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automator copy file type from one folder to another not working

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