Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

qwerty0033

macrumors newbie
Original poster
May 5, 2011
25
0
Hi, can anyone please tell me how to improve this Folder Action workflow?

In the "Downloads" folder, I intend for it to move all .torrent files to the "Torrents" folder. However, whenever i add any file (eg pictures, videos, documents etc) to the "Downloads" folder, they sometimes pop into the "Torrents" folder. I also have another folder called "Torrented" in the "Downloads" folder, and it also sometimes pop into the "Torrents" folder.

So, my question is, what is wrong with the workflow??

attachment.php


attachment.php



Thanks! :)
 

Attachments

  • Screen shot 2011-06-17 at 11.38.27 PM.png
    Screen shot 2011-06-17 at 11.38.27 PM.png
    58.7 KB · Views: 970
  • Screen shot 2011-06-17 at 11.44.00 PM.png
    Screen shot 2011-06-17 at 11.44.00 PM.png
    14.9 KB · Views: 955

chown33

Moderator
Staff member
Aug 9, 2009
10,747
8,420
A sea of green
Try removing the "Get Selected Finder Items" action and see what happens.

That action doesn't make sense to me in a Folder Action workflow. "Get Selected Finder Items" means that all manually selected items you have in the Finder are fed into the next step.

You might want to follow an Automator tutorial, or spend some time looking up exactly what the actions do.
http://macapper.com/2007/05/28/tutorial-automator-basics/
 

qwerty0033

macrumors newbie
Original poster
May 5, 2011
25
0
attachment.php


No results displayed, even though there IS a torrent file in there.

The problem is, I find it inconsistent, because sometimes, the "Torrented" folder or some newly downloaded pictures will get moved into the "Torrents" folder, despite my instructions to automator being very clear as in extension only.
 

Attachments

  • Screen shot 2011-06-21 at 6.22.28 PM.png
    Screen shot 2011-06-21 at 6.22.28 PM.png
    87.3 KB · Views: 873

chown33

Moderator
Staff member
Aug 9, 2009
10,747
8,420
A sea of green
When I setup a Folder Action workflow similar to yours, and try to run it in Automator, it presents a dialog sheet saying:
This folder action will not receive input when run inside Automator.
To test this folder action within Automator, add the
“Get Specified Finder Items” action to the beginning
of your workflow. Remove or disable the action
before running the workflow outside of Automator.​

There's also a checkbox saying "Do not show this message again". I'm guessing you've checked that checkbox at some point in the past.

You can reinstate the dialog by choosing Reset Warnings from the Automator menu in the menubar.
 

qwerty0033

macrumors newbie
Original poster
May 5, 2011
25
0
No, the problem is, I find it inconsistent, because whether or not it is run in Automator, sometimes, the "Torrented" folder or some newly downloaded pictures will get moved into the "Torrents" folder, despite my instructions to Automator being very clear as in extension only.

Why does this happen at all?
 

McFunkerson

macrumors newbie
Nov 21, 2010
28
0
Phoenix, Az
I used to have a Automator action that filtered files by file extension as well. I found that if I made the Filter Finder Items rules "File extension is..." it didn't work well. When I changed it to "File extension contains" my problems went away.

Chown33 is right though, you should not need the "Get Selected Finder Items" action. The reason you were probably getting inconsistent results is that this action gets anything that is currently selected in the finder and then passes them on to your next action. So lets say you want to test your workflow by grabbing a .torrent file and moving it to your watched folder. It's going to appear to work correctly because after you move your file manually it's still selected in the finder. Then next time you download a .torrent file you might have had a finder window open with some pictures or something selected so it grabbed those files and passed them to your "Move Finder Items" action.

You can't test a folder action by hitting the "Run" button in Automator because it isn't grabbing the contents of the folder. You will have to drag an item into the folder in the finder to test after saving your action. My suggestion is to put a torrent file in there first, save the action, and then drag in a text file to activate the Folder Action.
 

qwerty0033

macrumors newbie
Original poster
May 5, 2011
25
0
Thanks McFunkerson, I hope that using "contains" will solve this. I'll set them that way and test for a while now to see if it solves the problem entirely.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.