1 2 Previous Next 18 Replies Latest reply: May 31, 2012 6:56 PM by Frank Caggiano
Tomfoolery82 Level 1 Level 1 (0 points)

I have a folder action set up to open movie files in a conversion app but every time I add a new file it loads all the files in the folder.  How can i exclude a file that has already been opened by the folder action.  I can't move the file due to queing up moves for conversion if the file is moved after it is opened the the program doesn't know where to look for it.  Any idea's.  Ive tried Filter finder items by last opened and set it as today but that did not work. It opened nothing.  May I could set it up to know if the file has been there longer then 5 min that the folder action should not open it.  Thanks for your help.

 

This is for OS X 10.7.4


Mac Pro, Mac OS X (10.7.3)
  • 1. Re: Need help with folder action
    Frank Caggiano Level 7 Level 7 (23,865 points)

    You'll need to attach your script so we can see what you are doing to comment on it.

     

    The folder action should only be sending the files that have been added. The basic template for folder actions is:

     

    on adding folder items to this_folder after receiving these_items

      -- insert actions here

    end adding folder items to


    this_folder will have the name of the folder the action is attached to and these_items will have the new files added to the folder.

     

    But again seeing what you are doing will help figure out what the problem is.

  • 2. Re: Need help with folder action
    Tomfoolery82 Level 1 Level 1 (0 points)

    Screen Shot 2012-05-29 at 6.16.07 PM.png this is my folder action set up before open finder items what do i need to add to tell it not to open a file it has already opened

  • 3. Re: Need help with folder action
    Tomfoolery82 Level 1 Level 1 (0 points)

    if there is a better way to do it please let me know bassically i want to only open the movie file nothing else in a conversion program and trash all the rest of the files.  everything i have set works execpt say 123.avi is in the folder and the folder action takes place it opens 123.avi in the video converter.  if I add and new file ABC.avi to the folder the folder action opens 123.avi and ABC.avi   I want it to know that 123.avi was already opened so it does not open them again.

  • 4. Re: Need help with folder action
    Camelot Level 8 Level 8 (45,790 points)

    Your Folder Action doesn't work because it completely ignores the folder in question and uses the 'Find Finder Items' action to locate specific files - all the 'Folder Action' element is doing is firing off your action when the folder is changed (e.g. a new file is dropped in it), but it's not reacting to the changes itself.

     

    Instead, you should set your Folder Action to respond to the folder, along with a filter to identify the movies:

     

    /___sbsstatic___/migration-images/migration-img-not-avail.png

  • 5. Re: Need help with folder action
    Frank Caggiano Level 7 Level 7 (23,865 points)

    As Camalot wrote what you have there isnt a folder action. When you start Automator you're give the choice of what template to use to write you Auomator script. You need to choose the Folder Action

     

    Screen Shot 2012-05-30 at 08.05.11 .png

    Once you've selected that you can set the folder you want the action to act on

     

    Screen Shot 2012-05-30 at 08.08.36 .png

     

    Then you can add the actions to just act on the files added to the folder.

     

    good luck post back if you have anymore questions.

     

    BTW mentioning that you were using Automator in your first post would have been helpful as I assumed you were doing this in Applescript. And it is always a good idea to include your code so we can see what it is you are doing.

     

    regards

  • 6. Re: Need help with folder action
    Tomfoolery82 Level 1 Level 1 (0 points)

    That is exactly what I did.  In camelots post he saying something about not use find finder items first just use filter items.    I tried that first and no results show up in Automator.  Actually for several folder actions I have I had to use find finder items first then filter to get any result.  I used the folder action like your are showing and selected a folder where you have it circled but if I do not use find finder items nothing happens

  • 7. Re: Need help with folder action
    Frank Caggiano Level 7 Level 7 (23,865 points)

    That is exactly what I did.

    What is this referring to? Are you saying you selected Folder Action as the template in Automator? If you did then something want very because in the screen shot of your Automator workflow the folder selection bit isn't there.

     

    Try it again and make sure you have the folder selection pulldown at the top of the workflow.

     

    Here is an example of a workflow that is attached to my Desktop and puts a green label on files added to the desktop by screen capture.

     

     

     

    Screen Shot 2012-05-30 at 13.29.43 .png

    Try something simple (like this) to start with just to get a feel for how this works.

     

    Message was edited by: Frank Caggiano

  • 8. Re: Need help with folder action
    Tomfoolery82 Level 1 Level 1 (0 points)

    Yeah in the screen shot it is not there cause I didn't have enough room to get into view.  But it is all set up the way you suggest.  But nothing happens unless I use find finder items first.  I don't get it I thought making the selection your talking about basically already does the find finder items right

  • 9. Re: Need help with folder action
    Frank Caggiano Level 7 Level 7 (23,865 points)

    Are you saving the folder action from Automator? Is the action attached to the folder you think it is? (right click the folder and select Folder Actions Setups to se the actions and the folders attached)

     

    Have you tried to create the action I showed (or something similarly simple)? Does that work?

     

    But nothing happens unless I use find finder items first.  I don't get it I thought making the selection your talking about basically already does the find finder items right

    By using Find Finder Items you're basically defeating the purpose of the folder action. You're right by specifying the folder in the header the files added to that folder should be passed to the first action as the workflow I showed does.

     

    Again try creating what I showed and see it you can get that working.

     

    good luck.

     

    Message was edited by: Frank Caggiano -Link to workflow https://www.dropbox.com/s/g5oc3sbjqyuo5p2/LabelScreenShots.zip

  • 10. Re: Need help with folder action
    Tomfoolery82 Level 1 Level 1 (0 points)

    Yes I will try that and come back with results.   Thank you all for the quick responeses.  I kinda nice to ask a question in a forum and have someone help and not just leave 1 idea.  Thanks guys.  I'll post back around 6 pm PST with results

  • 11. Re: Need help with folder action
    Tomfoolery82 Level 1 Level 1 (0 points)

    here is my result which is happening every time I have 6 movies in this folder all that can be opened by the app that I want to open them still no result.  I did save it and attaced it to the apropriate folder.  Would it make a

    differecnce if my user folder is on a different hard drive then OS X?  Cause it is.

     

     

     

    Screen Shot 2012-05-30 at 7.31.50 PM.png

  • 12. Re: Need help with folder action
    red_menace Level 6 Level 6 (14,615 points)

    The Filter Finder Items action uses Spotlight, so if the items are not in the database you won't get any results.

  • 13. Re: Need help with folder action
    Tomfoolery82 Level 1 Level 1 (0 points)

    Spotlight finds them

     

    Screen Shot 2012-05-30 at 11.19.36 PM.png

  • 14. Re: Need help with folder action
    twtwtw Level 5 Level 5 (4,690 points)

    so let's be clear. You take the movies out of the folder, attach the folder action, and then move the movies back in and nothing happens?  Folder actions won't act on items that are already sitting in the folder.

1 2 Previous Next