Folder actions not running

I created a simple automator script to move different files to different places from my downloads folder. I then saved that as a plugin and attached it to the downloads folder. However it never runs. Is there something I am missing?

I think it will also work if an alias to the application is placed in the folder actions folder. The original application can be placed anywhere you like.

Similar Messages

  • Automator Folder Action Not Running

    I have created a simple automator folder action that helps me to keep my downloads folder organized.    I want to move various files with certain file exensions to specific folder.
    I am finding the process to be intermittantly successful.   Sometimes it works, sometimes it does not run.      I've looked in activity monitor but do not see the automator launcher process running.   I think that is why I am having issues.   At other times, when it does run,  the workflow hangs and I have to kill Automator Runner.
    Any ideas on helping me with automator folder actions?
    Thank you,
    Jerold

    What does Finder -> select folder -> Control-Click -> Services -> Folder Actions Setup say about your existing folder action?
    Are folder actions enabled in the setup window?
    Is your folder action attached to your folder?
    For diagnostics, create a very simple Automator folder action (such as "Ask for Confirmation"; it does not need to make sense, it just needs to be something that you can use to verify the folder action occurred), and attach that to any folder. If that works, build up to making your PDF action work.

  • Folder action not working outside automator

    I have a folder action to convert and move all mkv files from within the downloads folder. The folder action included (among other) the following script:
    on run {input, parameters}
              set filename to POSIX path of input
              do shell script "/usr/local/bin/mkvdts2ac3.sh -n " & quoted form of filename user name "white" password "*****)" with administrator privileges
      #do shell script "mount -t smbfs //panos:z2kdft50@nas/internal internal" user name "white" password "******)" with administrator privileges
              do shell script "mv " & quoted form of filename & " /Users/white/internal/library/" user name "white" password "****)" with administrator privileges
              do shell script "rm -rf /Users/white/Downloads/*.dts" user name "white" password "*****)" with administrator privileges
              set message to "File " & filename
              return message
    end run
    The total workflow runs perfectly from within automator.
    The problem is that when the folder action is triggered from the system (regular usage, ouside automator) the workflow executes up to the point that the applescript is implemented (I ghave installed growl notifications at various points to know how far the script has run)
    Does anybody have any idea why could this be happening?
    I  have looked around but found no answers.
    Thanks.
    <Edited by Host>

    Thanks.
    I replaced the applescript with the following shell script:
    /usr/local/bin/mkvdts2ac3.sh -n $@
    mv $@ /Users/white/internal/library/
    rm -rf /Users/white/Downloads/$@
    It works.
    I had tried a shell script in the very begining, but I could not get it to work so I resorted to Applescript instead. I felt myself too that applescript was an unnecessary complicated procedure just to run shell commands.
    Anyway, now, each time a dts download finishes, it gets transcoded to dolby digital so that it can be played on my samsung tv (it's media player does not support dts).

  • What does this simple folder action not work?

    OK I have been playing with this all weekend. I just wanted a simple folder action to move a file from folder a to folder b. There is really not much to it. The workflow works just fine. "Somtimes" running the script runs the workflow.app. However when I drop a file into folder a - nothing happens. I have enabled folder actions. Can anyone help?
    here is a pic of the relative screens that should help you.
    http://flickr.com/photos/hawsnet/2605303472/sizes/l/
    Thanks for any help you can provide.
    PS I even stopped by my local Genius Bar -- they could not help.

    Vantive,
    Try either:
    *on adding folder items to this_folder after receiving added_items*
    *tell application "Finder"*
    *repeat with this_item in added_items*
    *move this_item to folder "Folder B" of folder "Desktop" of folder¬*
    *"MyShortName" of folder "Users" of the startup disk*
    *end repeat*
    *end tell*
    *end adding folder items to*
    Or:
    *on adding folder items to this_folder after receiving added_items*
    *tell application "Finder"*
    *repeat with this_item in added_items*
    *move this_item to "Macintosh HD:Users:MyShortName:Desktop:Folder B"*
    *end repeat*
    *end tell*
    *end adding folder items to*
    In either case replace MyShortName with your actual short name. +Make sure the script is saved to your Home/Library/Scripts/Folder Action Scripts folder.+ Then right-click or control-click on "Folder A" and, if necessary, select "Enable Folder Actions." If enabled, right-click or control-click on "Folder A" and select "Attach a Folder Action…" When the Choose-a-File window appears highlight the script and press Choose.
    Both of the above scripts worked for me in testing. For what it's worth, both my /Library/LaunchAgents, and /System/Library/LaunchAgents folders are empty.
    Good Luck...
    Regards, Andrew99

  • Some actions not running properly

    Some of my actions cannot run at all, like the Totally Rad Black and white action. Just doesn't work.  Some work fine, others will say that the object isn't available, but, you can play through it.  Totally Rad actions seem to have the most trouble, but, by no means the only ones.  Any input would help

    Being they were fine from CS2 forward, I have a hard time truly thinking that Superstition is that far ahead of CS5 that actions that work fine with it, are too old.  Since this is in beta, I am reporting this issue to see if anyone else has had problems and might have a work around. It may be something simple as clicking on a step that I didn't think to do. Its not my first upgrade Just trying to troubleshoot here.

  • Folder Actions not working

    I'm trying out folder actions for the first time, and I cannot get an action to trigger.
    I regularly use Automator, and I've saved a script as a Folder Action plug-in attached to a folder. I've tried this with several different scripts.
    For example, I've got a script that just displays a message. It works fine if I save it as an app, so I save it as a Plug In>Folder Action. If I select, say, my documents folder, I right click>more>attach a folder action. I then select my script. If I open the Folder Actions Setup, my script is listed as attached to my documents folder. However, if I drop a file into the Documents folder, nothing happens.
    Am I correct in thinking that the script should run when a file is dropped into the folder (and if I'm wrong, how would you do this?), or have I missed something?
    I'm using 2x 2,8GHz Quad-Core Intel Xeon Mac, OsX 10.5.6.
    Cheers
    Steve

    In the Finder (Mac) Help, every user may read:
    *+Running an automation when a folder is changed+*
    +Folder actions let you run automations when a folder is modified. For example, you could run an AppleScript or an Automator workflow whenever something is added to a dropbox folder.+
    +To use folder actions, you attach a folder action script or workflow to a folder. When the folder is opened, closed, or modified, the automation will be activated automatically.+
    +Your script must include a handler for each folder action command used.+
    +To make a folder action scripts available to all users of your computer, put them in the Folder Action Scripts folder located at:+
    +Library/Scripts/Folder Action Scripts/+
    +To make the scripts available only to the current user, put them in the home folder at:+
    +~/Library/Scripts/Folder Action Scripts/+
    *+To enable folder actions:+*
    +1. Open Folder Actions Setup in the Applications/AppleScript folder.+
    +2. Select Enable Folder Actions.+
    +3. Click the ╋ button below the Folders with Actions list and choose the folder containing the folder actions.+
    +4. Click the ╋ button below the Script list and select the desired scripts, then click Attach.+
    My guess is that you missed one of the four steps.
    Yvan KOENIG (from FRANCE vendredi 5 juin 2009 17:09:05)

  • Folder action not working

    I can't figure out why the following folder action script does not work.  I get the alert message but when I choose 'yes' the file is not copied...am I missing something?
    Thanks.
    Pedro
    property dialog_timeout : 30 -- set the amount of time before dialogs auto-answer.
    on adding folder items to this_folder after receiving added_items
        try
            tell application "Finder"
                --get the name of the folder
                set the folder_name to the name of this_folder
            end tell
            -- find out how many new items have been placed in the folder
            set the item_count to the number of items in the added_items
            --create the alert string
            set alert_message to ("Folder Actions Alert:" & return & return) as Unicode text
            if the item_count is greater than 1 then
                set alert_message to alert_message & (the item_count as text) & " new items have "
            else
                set alert_message to alert_message & "One new item has "
            end if
            set alert_message to alert_message & "been placed in folder " & «data utxt201C» & the folder_name & «data utxt201D» & "."
            set the alert_message to (the alert_message & return & return & "Would you like to view the added items?")
            display dialog the alert_message buttons {"Yes", "No"} default button 2 with icon 1 giving up after dialog_timeout
            set the user_choice to the button returned of the result
            if user_choice is "Yes" then
                tell application "Finder"
                    activate
                    set copyFolder to "Photo [Data]:10 Multimedia:CompAlerts:"
                    set copyitem to file "MacOS:Users:Peter:Documents:CompAlert.rtf"
                    duplicate file copyitem to copyFolder with replacing--THIS DOES NOT EXECUTE
                    --go to the desktop
                    --open the folder
                    --open this_folder
                    --select the items
                    --reveal the added_items
                end tell
            end if
        end try
    end adding folder items to

    The only standout is the line:
                    duplicate file copyitem to copyFolder with replacing--THIS DOES NOT EXECUTE
    where:
                    set copyFolder to "Photo [Data]:10 Multimedia:CompAlerts:"
    In other words, copyFolder is a string. You're trying to duplicate a file to a string? Doesn't seem viable to me.
    Maybe you mean:
                    duplicate copyitem to folder copyFolder with replacing
    In other words, identify the destination as a folder rather than a string.
    If that doesn't work, remove the try/end try statements. This will let the script report any errors, rather than failing gracefully. try/end try is useful for production but supresses error messages, which makes troubleshooting harder.

  • Action not running

    set up an action to reduce file size (width down to 10" across) and save as .jpg - 7 - when running action i keep getting an "image size is not available" error -
    what am i doing wrong?

    ok, got script to run, although it is opening all files, it is affecting some and just resaving others....

  • Folder Actions script no longer runs on new file creation

    Hope this isn't trivial.......first time posting here...hopefully in the right place.I'm not a total Mac OS X newbie...and surely no techie, either. Dabbled a wee bit with Automator and scratchin' my head on this one. Help, please!
    Any idea why folder actions not running when a new file is saved? A simple add-color-label script created in Automator was workin' fine before I did a Snow Leopard-to-Leopard downgrade clean-install & account migration from external HD (TimeMachine) backup. Folder actions are enabled and script runs only if I start it with Automator Runner. Previously, it would label the file as soon as I saved it....now it needs a manual start. Is this default behavior in Leopard? Or am I missing something or doin' something wrong? Or is this a consequence of downgrade? I was sure I had the same script workin ok in my original Leopard install - though possibly un-modified at that time.
    I have no clue why, but the new version I created recently (cpl wks ago?)worked the first time I added a new file but not thereafter...and in that instance it only labelled the file in Finder upon quitting Preview (file is a Grab saved as pdf).
    The reason for the downgrade was compatibility problems with Photoshop CS4 on SL (OS & app all updated yet crashin' at the drop of a hat) - maybe due to lack of RAM? (only 1GB). Saw quite a few posts regarding SL running CS4 problems, so now I'm back to running 10.5.8 ..again.. and PS actually runs smooth like it did before.
    Maybe these console messages are a help......or am I barkin' up the wrong tree?
    6/11/11 7:44:54 PM /System/Library/CoreServices/Folder Actions Dispatcher.app/Contents/MacOS/Folder Actions Dispatcher[91] CPSGetProcessInfo(): This call is deprecated and should not be called anymore.
    6/11/11 7:44:54 PM /System/Library/CoreServices/Folder Actions Dispatcher.app/Contents/MacOS/Folder Actions Dispatcher[91] CPSPBGetProcessInfo(): This call is deprecated and should not be called anymore.
    6/11/11 7:44:54 PM /System/Library/CoreServices/AppleScript Runner.app/Contents/MacOS/AppleScript Runner[264] CPSGetFrontProcess(): This call is deprecated and should not be called anymore. 
    6/11/11 8:19:12 PM Automator Runner[415] Error while processing arguments
    6/11/11 8:20:31 PM /Applications/AppleScript/Folder Actions Setup.app/Contents/MacOS/Folder Actions Setup[420] CPSGetProcessInfo(): This call is deprecated and should not be called anymore.
    6/11/11 8:20:31 PM /Applications/AppleScript/Folder Actions Setup.app/Contents/MacOS/Folder Actions Setup[420] CPSPBGetProcessInfo(): This call is deprecated and should not be called anymore.
    6/11/11 8:20:32 PM [0x0-0x5b05b].com.apple.systemevents[421] com.apple.FolderActions.enabled: Already loaded
    And for that matter....why does Automator throw these messages? All apps (except iWork '08 apps) and OS are up to date.
        - Just a few of the many actions not loaded:
    6/11/11 7:48:25 PM Automator[294] The action “Start iTunes Visuals” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 7:48:25 PM Automator[294] The action “Stop iTunes Visuals” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 7:48:25 PM Automator[294] The action “Update iPod” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 7:56:33 PM Automator[294] name = name was not found
    6/11/11 7:56:33 PM Automator[294] name = name extension was not found
    6/11/11 7:56:33 PM Automator[294] name = file type was not found
    6/11/11 8:00:29 PM Automator Runner[339] Error while processing arguments
    6/11/11 8:00:30 PM Automator Runner[339] The action “Import Files into iTunes” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 8:00:30 PM Automator Runner[339] The action “Add Songs to iPod” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 8:00:30 PM Automator Runner[339] The action “Add Songs to Playlist” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 8:00:30 PM Automator Runner[339] The action “Apply SQL” could not be loaded because the application “Xcode” was not found.
    Do I need to wipe the drive again and re-install everything?
    Any help is greatly appreciated. Apologies if this seems long-winded.

    Folder Actions are set up a bit differently in Leopard (they use an AppleScript wrapper), and several actions have been updated to use new technologies available in Snow Leopard.  Looking at some of your console logs, it looks like some actions or workflows were just copied over from Snow Leopard.  When changing versions like that, you should rebuild the workflows so that they link to the correct actions, and check added actions for any dependencies (an action won't be loaded if it requires resources that are not available).
    Resaving your Folder Action workflow as a Folder Action Plug-in should do the trick.

  • Problem running multiple folder actions at the same time

    Hi,
    Does anyone have some experience running multiple folder actions at the same time?
    I've written a Applescript folder action that processes some files. When adding some files, the script starts and all goes well. The processing of each file takes a few minutes, but all files are processed correctly.
    However, when adding some new files to the dropfolder, while the folder action is all ready processing other files dropped a few minutes earlier, the process that is all ready running immediately aborts and the folder action is relaunched on the new files, leaving the old files for what they are...
    The same problem occurs with multiple folders, each having a folder action attached. When dropping files in "Folder A", the script starts processing. But if someone droppes files in "Folder B", The script of folder A aborts, and the script of folder B starts processing. When adding more files to the folders, the result is the same. In some casses, when the last dropped files are processed, the os continues where the operation was aborted on the previous files. But this not always happens. To make things worse, when you remove the items from the folders afterwords, the folder actions starts running again on items no longer present in the folder !!!!
    Does anyone know how I can prevent the folder action being aborted when new files are dropped and placing the new files in "Hold", until the previous files are processed? How can I prevent a folder action being aborted when a item is dropped into another folder?
    I've written a small script to test this behaviour. Just create one or more folders and attach the script below. Drop a item into the folder, wait a few seconds and drop another one in the same or another folder. To monitor what happens please check the console.
    on adding folder items to this_folder after receiving added_items
              set FolderName to this_folder as string
              set ItemName to added_items as string
              repeat with theIncrementValue from 1 to 15
      delay 2
                        do shell script ("logger \"Folder: " & FolderName & "  -  Item: " & ItemName & "  -  Step: " & theIncrementValue & "\"")
              end repeat
              do shell script ("logger \"Folder: " & FolderName & "  -  Item: " & ItemName & "  -  Done...\"")
    end adding folder items to
    Thanks for any feedback.

    That is pretty much the way Folder Actions work, especially since AppleScript is not multi-threaded.  If you are using them as some intermediate step in a workflow, you might rethink the way you are handling the files (for example, use a droplet instead).  Other options would be using launchd to watch a path or a shell script on a different thread.

  • Folder action to change the label of the folder

    Hi all
    I would like to use Automator/Folder Actions to set the Label of the folder to show that it contains a file that was created or modified as follows:
    Red if in the last three days,
    Orange if over three days but less than seven; and
    Yellow if over seven days but less than fourteen
    Oh, and clear the folder label if the contents of the folder are over fourteen days old.
    Is it possible to do using Automator and folder actions?
    Thanks
    Jai
    iMac G5; iBook G3; PB165c; PB170; Mac IIcx; Mac SE/30; Mac SE; Mac Plus; Newton 130; 2gen iPod 10G     Mac OS X (10.4.7)   MacUser since 1984... and waiting for a tablet (like the Nokia 770 with MacOSX)

    In Automator-No
    The trigger for folder actions to run is the act of adding a file/folder to the folder which has the action applied. If you don't add anything, they won't do anything.
    You could probably get close to what you want using Smart Folders. It won't be color-coded or perfect though because modifying a file doesn't always reflect on the modification date of the folder. And parent folders are not affected by changes made in sub-folders.

  • Create folder action in automator

    I want to create a folder action that will move downloaded website backups into a specific folder.
    I cribbed the automator folder action shown below from Macworld
    The Folder Action appears not to work when left to just monitor the folder.
    However, if I force the Action to run from within automator it works, albeit with an error message at the beginning saying that you can't execute the action from within Automator. Still it finds the file and moves it to the intended destination.
    By way of checking this I looked at the "Set Up Folder Action" by right clicking on the downloads folder. After clicking there is a long delay but when the panel opens there is no content, see second image below. I tried clicking the + button to add the "Downloads" folder but after a long delay the "Open" dialog closes and nothing has appeared in the panel. I assume that any folder action should show up in this panel, but I've no experience in using it.
    Any suggestions as to a problem with the Action or why the panel is blank and why I can't attach the Action using this setup panel?
    Thanks
    Folder Action
    Note: Path and File have been omitted.
    Note: OS X 10.10.2
    Folder Action Setup

    I'm confused. You showed two Automator actions with the same name, one was a folder action one wasn't.
    Are you sure the correct Automator action (the one that is a folder action) is attached to the folder?
    If when the Folders Action setup window is opened and you select Articles_Folder.workflow and then edit script are you getting the right workflow?
    Assuming you do I would start off very simply. Try this:
    It will label green screen shot image files saved to the Desktop.
    See if this works for you.

  • Using Automator Folder Actions

    I have an automator folder action that runs to take any pdf file dumped in to the folder, send to the printer and then delete it.
    How do I make this run on a server that I'm not logged in to (effectively as a service), so that if a pdf file is generated somewhere on the network (maybe even a PHP script on a web site hosted on this server) and copied to this folder it still auto prints to the network printer?

    I'm using a hot folder to import to Aperture as well, and also had the same problems when I try to configure it.
    I solve it by creating an action in Automator that will copy all the images from the memory card to a temp folder when a card is inserted in the card reader. At the end of the action all the files inside the temp folder are moved to the actual hot folder, as you said this is almost instant so works perfectly.
    So basicly the workaround is the following:
    Card inserted - Image capture starts and copy all the images to a temp folder - Images then move to Aperture's hot folder - Aperture gets all the images.

  • Question about Folder Actions

    I have 2 folders and Each folder has a folder action attached.
    When manually drag a file in the folders both scripts work.
    But the intention is that the first folder move files to the second folder and the second folder does the folder action script.
    But (Only) when the files are moved by the first script the second folder action does nothing.When I drag an other file in the second folder it does the action on all files within that folder.
    intention:
    Folder 1 : Check files and move the selected files to other folders
    Folder 2 : Make report and move file to another folder
    How I can improve this?
    start of the second folder action... if that's the problem.
    on adding folder items to this_folder after receiving these_items
    try
    tell application "Finder"
    set numFiles to (number of files of folder this_folder)
    repeat with i from 1 to numFiles
    set curFile to the item 1 of this_folder
    set curFilename to name of curFile as text
    thanks

    Hello
    Perhaps you're seeing a long standing defect of Finder, which often fails to udate its internal cache of file system objects in time.
    One method to try is to use 'update' command of Finder. Like CODE1 below.
    --CODE1
    on adding folder items to this_folder after receiving these_items
    try
    tell application "Finder"
    update these_items -- # added
    update this_folder -- # added
    set numFiles to (count files of folder this_folder)
    repeat with i from 1 to numFiles
    set curFile to item 1 of this_folder
    set curFilename to name of curFile
    -- # rest omitted
    (* Since curFile is always assinged to item 1 of this_folder,
    curFile is supposed to be removed from this_folder within this repeat loop. *)
    end repeat
    end tell
    on error errs number errn
    display dialog errs & " " & errn with icon 2 giving up after 5
    end try
    end adding folder items to
    --END OF CODE1
    By the way, your original code is not using these_items that is passed by Folder Action Server. However, from Folder Action's point of view, you should solely use these_items to process them because there's NO guarantee that 'item k of folder this_folder of application "Finder"' at the time of its execution is the item k of these_items. (E.g. Suppose there's another group of files newly added to the folder while an instance of Folder Action is running to process a group of files already added.)
    So I'd rather recommend something like CODE2 below.
    --CODE2
    on adding folder items to this_folder after receiving these_items
    try
    tell application "Finder"
    repeat with i from 1 to (count these_items)
    set curFile to item i of these_items
    set curFilename to name of curFile
    -- # rest omitted
    end repeat
    end tell
    on error errs number errn
    display dialog errs & " " & errn with icon 2 giving up after 5
    end try
    end adding folder items to
    --END OF CODE2
    Good luck,
    H
    Message was edited by: Hiroto (fixed typo)

  • Folder Action on Modification of a File

    How do I get a Folder Action to run when a file is modified, not just when one is added?

    you can't. The only available folder action handlers are:
    adding folder items, removing folder items, opening folder, closing folder window and moving folder window.
    you can do this for individual files by creating launch daemons but that's probably not what you want as you'd have to create a separate launch daemon for each file in your folder.

Maybe you are looking for

  • Design Problem When SSIS Get String From Web to Do Fuzzy Lookup

    Hi! In my previous post Search Data by Fuzzy Lookup in Real Time Scenario, I've tested required functions to build a sample website and SSIS, now it's time to polish my design. Since user will query a name from Web, SSIS is supposed to get a string t

  • Can NOT drag and drop to combine Events

    I've combined Events zillions of times in iPhoto and drag-'n-drop in Aperture 3 also. Today, when I tried to drag one Event into another, it didn't work. It didn't 'release' into the new event when I let go of the mouse button. I restarted iPhoto - s

  • How can I bypass the password with createinstance ?

    Hi, When i use the command : $ORACLE_HOME/bin/createinstance -instanceName MEDIWEB_OPE -groupName default_group I am asked for the administrator password. I have been following the documentation at http://www.oracle.com/technetwork/middleware/ias/oc4

  • Putting iMovie events back on the computer from backup disk

    I moved some events to an external disk, and now I want to bring them back to my computer since I will be working with the video and dont want to leave my backup drive down here in the office (I store it in a fire proof safe). HOw do I do this, I see

  • IPod doesn`t recog./indicate any longer, after inadvertent connect. firewir

    Dear Users, perhaps some of you can help me with this problem: since I connect my iPod 5G with the Firewire-Cord of my son´s iPod mini, my iPod isn´t recognized any longer on every Computer i connect him via USB! The notice on my iPod after the Conne