Problem with the "Copy Finder Items" action and variables

I have having a problem with the Copy Finder Items action and variables.

This is my workflow.

  1. New folder: MyFolder-TodaysDate-CurrentTime
  2. Set Value of Variable: FolderPath (path of new folder)
  3. Ask for Finder Items
  4. Copy Finder Items to FolderPath variable

When I run the workflow, the folder is created and the files/folders are copied, but I get an empty folder with the same name (MyFolder-TodaysDate-CurrentTime) inside the parent folder.

In the View Result action, I get this:

Any suggestions?

Thomas Berglund

That is some odd behavior; it must be that the New Folder is also considered a Finder Item and the Ask For Finder Items simply adds more items to the list. I tried modifying the order of the actions, but it still did the same as you describe.

It is a poor fix, but what works for me is to insert a Filter Finder Items action after the Ask For Finder Items and before the Copy Finder Items actions. In the Filter action, I set it for Name does not contain MyFolder.

I will keep playing with it and see what else develops.

Thanks for your quick reply. Really appreciate it! Tried your workaround, and it seems to work fine.

I am running Mac OS X 10.5.4, so I have the latest version of Automator available to the public. I will file a bug report on this to Apple.

Please let me know if you find a better way :slight_smile: