On change folder action

Hello, Is there an "On Change" folder action? This would be very useful for many things.
thnaks, Eli

On change of what?
The trigger for a Folder Action is a change in the folder.

Similar Messages

  • 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 to find and replace text and change line feeds

    I want to use a folder action to find and replace text and change Mac carriage returns to DOS line feeds inside text files.
    The text to be replaced is: "/Users/wim/Music/iTunes/iTunes Music/Music" (without the quotes)
    This text has to be removed (i.e. replaced by an empty string)
    The text occurs many times within each file.
    The files are playlists exported from iTunes in the M3U format (which are text files). They contain Mac carriage returns. These need to be changed to DOS line feeds.
    I have found the following two perl commands to achieve this:
    To find and replace text: perl -pi -w -e 's/THIS/THAT/g;' *.txt
    To change carriage returns to line feeds: perl -i -pe 's/\015/\015\012/g' mac-file
    I know that it's possible to make a folder action with Automator that executes a shell script.
    What I want to do is drop the exported playlists in M3U format in a folder so that the folder action will remove the right text and change the carriage returns.
    My questions are:
    Is it possible to make a folder action that executes command line commands instead of shell scripts?
    What is the correct syntax for the two commands when used in a folder action shell script? Especially, how do I escape the slashes (/) in the string to be removed?
    Thanks for your help

    Ok, I've include an applescript to run a shell command. The applesript command quoted form makes a string that will end up as a single string on the bash command line.  Depending on what you want to do, you may need multiple string on the bash command lines.  I've included some information on folder actions.
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set desktopPath to (path to desktop) as string
        log "desktopPath = " & desktopPath
        set unixDesktopPath to POSIX path of desktopPath
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "ls -l  " & quotedUnixDesktopPath
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run
    How to set up a folder action.
    1) right click on folder. click on Enable folder actions
    2) Place script in
    /Library/Scripts/Folder Actions Scripts
    3) right click on folder. click on attach folder action
    pick your script.
    Create a new folder on the desktop & try.
    You can put multiple folder actions on a folder. There are other ways of doing this.
    Here is my test script:
    on adding folder items to this_folder after receiving dropped_items
        repeat with dropped_item_ref in dropped_items
           display dialog "dropped files is " & dropped_item_ref & " on folder " & this_folder
        end repeat
    end adding folder items to
    How to  make the text into an AppleScript program.
    Start the AppleScript Editor
    /Applications/AppleScript/Script Editor.app
    In Snow Leopard it's at: /Applications/Utilities/AppleScript Editor
    Copy the script text to the Applescript editor.
    Note: The ¬ is typed as option+return.  ption+return is the Applescript line continuation characters.
    You may need to retype these characters.
    Save the text to a file as an script and do not check any of the boxes below.

  • 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.

  • How to make Folder Action work on file, subfolder content change?

    Hi!
    I looking for information in how to make a Folder Action, Work Flow or any action from Automator to work on file change and not only on deletion, moving or insertion. What I want to know is if it's possible to trigger some script or app while monitoring a folder and its contents, files and subfolders, changes. Meaning that when I have a file that has its contents updated the action will be triggered like an txt file that I only insert a new line in it, for example.
    Is there any solution that is not third party? Is there an internal Mac OS X solution that would work on Snow Leopard, Lion and Mountain Lion?

    i have same problem. i would like to move automatically saved Word backup copy to another folder, but the folder action doesn't recognize the save as a new file that needs to be acted upon.

  • Applescript to change file type using folder action

    Just found out my Adobe Acrobat is saving PDFs with the filetype "FDP" and creator "ORAC" which is obviously the reverse of what they should be.
    There doesn't appear to be a fix for this, and for me it's a problem because when I copy these PDFs onto our Xinet WebNative asset management server the files aren't recognised as PDFs, so don't display a preview in the web page.
    So, I wanted to use a folder action that will set the Creator and Type to the PDFs whenever they are put into a folder on the server.
    Unfurtunately, although I can get this to work when using a script in the form of an application (so I drop PDFs onto it, I cannot get it to work as a folder action. It doesn't set the creator and type even though the same commands in a application script do work.
    *This is the code to my script which works fine as an application:*
    ====================
    property FileType : ""
    property CreatorType : ""
    on open theFiles
    tell application "Finder"
    activate
    set FileType to "PDF "
    set CreatorType to "CARO"
    repeat with eachFile in theFiles
    set the file type of eachFile to FileType
    set the creator type of eachFile to CreatorType
    end repeat
    end tell
    end open
    ===================
    *and this is what I'm trying to use for a folder action:*
    ===================
    on adding folder items to my_folder after receiving the_files
    set pdfs to {"pdf"}
    repeat with i from 1 to number of items in the_files
    tell application "Finder"
    set this_file to (item i of the_files)
    set the file_path to the quoted form of the POSIX path of this_file
    --set the file_path2 to the quoted form of file_path --can combine if file_path isn't needed
    set this_fileType to name extension of (info for this_file)
    end tell
    if this_fileType is in pdfs then
    tell application "Finder"
    activate
    set FileType to "PDF "
    set CreatorType to "CARO"
    end tell
    end if
    end repeat
    end adding folder items to
    ==================
    I know it processes the file but it doesn't actually change the creator type.
    *If only Apple would fix this bug in the first place!*

    Your folder action script isn't using the same commands, and doesn't do anything about setting file types or creator codes at all. Something like this should do the trick:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on adding folder items to my_folder after receiving the_files
    set pdfs to {"pdf"}
    repeat with each_file in the_files
    set this_fileType to name extension of (info for each_file)
    if this_fileType is in pdfs then
    tell application "Finder"
    set file type of each_file to "PDF "
    set creator type of each_file to "CARO"
    end tell
    end if
    end repeat
    end adding folder items to
    </pre>
    ... and by the way, Apple doesn't have anything to do with the file types, creator codes, or other application specific settings that an Adobe application sets for itself.

  • Change Tiger default Folder Action to parse all files in folder?

    I'd like to be able to use Automator and OSX Tigers Folder Actions to parse all files in a folder to an automator workflow, but it seems the default is that Folder Actions just pass the newest file added to a folder. Is it possible to modify the default applescript that says something like open_added to open_all? Sorry, not an applescripter so don't shout at me. What I'm trying to do is get automator to construct a variable URL from various txt files in a folder. I'm using the txt files as variables as Tigers Automator doesn't seem to be able to use variables or save and combine a result.

    That is the way that folder actions work. You can edit the AppleScript wrapper that Automator makes for your folder action, though, since the folder action handler also returns an alias to the attached folder.
    If you look in your user's *~/Library/Scripts/Folder Action Scripts* folder, the folder action script for your workflow looks something like this:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on adding folder items to this_folder after receiving added_items
    tell application "path:to:your:workflow.app"
    open added_items
    end tell
    end adding folder items to
    </pre>
    By changing the line open added_items to open {this_folder}, the script will pass the folder instead of the files, so you can then use that in your workflow (e.g. *Get Folder Contents*, etc).

  • Unzip/Unstuff Folder Action

    I wanted to set up a folder in which a file would automatically unzip/unstuff once it is done downloading from an FTP site, and V.K. in the Automator board showed me this applescript:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;" title="this text can be pasted into the Script Editor">
    property DELAYTIMESECONDS : 5 -- How long to wait between checking file size.
    on adding folder items to thisFolder after receiving theItems
    repeat with f in theItems
    set oldSize to 0
    set newSize to -1
    -- When newSize equals oldSize, it means the copy is complete because the size hasn't changed.
    repeat while newSize ≠ oldSize
    -- Get the file size.
    set oldSize to size of (info for f)
    delay DELAYTIMESECONDS
    -- Sample the size again after delay for comparison.
    set newSize to size of (info for f)
    end repeat
    -- Do your processing here on file f.
    tell application "Finder" to open f
    -- thats where my processing should start for each file
    end repeat
    -- Or start processing here to wait for all files to be complete.
    end adding folder items to</pre>
    I attached it to a folder, and it works, but only on the first file. If I let multiple files download concurrently, the script never kicks in for the second, third, etc. file. Can the applescript be modified so that it hits every file that is, eventually, saved to the folder?

    The problem is that the folder action gets triggered the minute something gets added to the folder. This works when everything is added at once, but if there is much of a time delay between adding items there can be a problem, since repeatedly firing off the same folder action script on the same folder with different items doesn't seem to work very well.
    Another thing to try would be to just look at the folder itself to stop changing size. After the folder has stopped changing size (presumably because the files have finished downloading), all of the files would then be processed. The items would need to be moved somewhere during the processing, so that the next time the folder action is triggered, it would just be processing the new items (if the processing just gets all of the files, a sub folder could be used).
    The following folder action is similar to what you were using, it just looks at the folder size.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on adding folder items to thisFolder after receiving theItems
    if (WaitForFilesToCopy into thisFolder for 60) then
    tell application "Finder"
    set theItems to (files of thisFolder) as alias list -- get a new item list
    end tell
    repeat with anItem in theItems
    -- do stuff with anItem
    end repeat
    else
    -- the downloads didn't happen in time
    end if
    end adding folder items to
    to WaitForFilesToCopy into TheFolder for TimeToWait
    waits up to the TimeToWait for files to be copied/downloaded to TheFolder
    the test is based on the size of the folder not changing after several seconds
    the rough TimeToWait may need to be adjusted if copying several files/folders
    parameters - TheFolder [mixed]: the folder to check
    TimeToWait [integer]: a maximum timeout value in seconds
    returns [boolean]: true if copy/download finished, false if timeout
    set {Possible, Interval} to {false, 3} -- change the check interval as desired
    set CurrentSize to size of (info for TheFolder) -- get initial size
    repeat (TimeToWait div Interval) times -- check every Interval seconds
    delay Interval
    set NewSize to size of (info for TheFolder) -- recheck size
    if (NewSize is equal to CurrentSize) then
    if Possible then -- no change since last time
    return true -- success
    else -- one more time...
    set Possible to true
    end if
    else -- update size & Possible switch
    set {CurrentSize, Possible} to {NewSize, false}
    end if
    end repeat
    return false -- fail (timeout)
    end WaitForFilesToCopy
    </pre>

  • 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.

  • Help Needed: Automator Applescript for Folder Action - Encode Video

    Hi !
    I have created an Automator Applescript for a Folder Action to do the following:
    When a new video file is moved to the target folder (i.e. Download of Vuze is done), automatically launch the Applescript Action that does the followin g(Applescripted):
    1) Using "run shell script" and FFMPEG on a UNIX command line, determine Width/Height, Framerate, Bitrate
    2) Calculate encoding parameters (slightly reduced bitrate, reduced Aspect etc.)
    3) Using "run shell script" with ffmpeg on the command line and the calculated parameters to encode the video file
    At the same time, the action is written to a log file so I know if a file is recognized, when encoding started etc.
    It works fine if I save this Action as an .app, make an alias on the Desktop and drop video files on it.
    It also works fine if I attach the script to a folder as a folder action and drag a video file in there.
    However, when I attach the script as a folder action to the Vuze download folder, it encodes only some video files, i.e. if there was a download of 5 files, chances are good that it will not encode 1 or 2 files out of those 5.
    If for example a second download finishes while the encoding for the first download is still going on, sometimes the second file starts encoding after the first encode finishes, sometimes it does not, the file does not make the log file at all, i.e. the folder action missed it or the automator action dropped it because it was still encoding. Still, sometimes it happens, sometimes not.
    As I need a solution that is 100% accurate, I would like to ask if there are any ideas on how to do this better maybe? As I am not an Applescript Guru, I would need some help to know what works and what doesn't and what the syntax is.
    My main idea right now:
    Similar to how ffmpegX works with its "process" application, have a second script (as .app) that receives the files to be encoded from the automator action and puts them in a queue, then proceeds to encode this queue while the main automator action is free to receive the next file.
    Writing this second app is quite straightforward (a modified version of my current script) but I have some questions I need help with:
    1) How do I call another applescript from within an existing applescript that launches the new applescript in a new process?
    2) How do I pass parameters to this new applescript?
    3) In case of this "Queueing" Idea, once I called the external applescript the first time, how do I make sure when I call next time, that I don't open a second instance of this script but rather pass another queue item to the original instance to be processed?
    Or in general: Is there a better way to achieve this automatic encoding solution that I have not thought about?
    Alternatively:
    Does anyone know how to call the "process" application that comes with the ffmpegX package with the correct parameters to use as a queueing / processing tool?
    Thanks!
    Joe
    Message was edited by: Joe15000
    Message was edited by: Joe15000

    To do this, I created an Automator workflow with an Applescript snippet to change the 'media kind'.
    Here is the 'Run Applescript' workflow step code:
    on run {input, parameters}
              tell application "iTunes"
                        set video kind of (item 1 of input) to movie
              end tell
              return input
    end run
    Prior to this running, I have an 'Import Files into iTunes' workflow step.
    You can switch out 'movie' with: 'TV show', 'music video', or anything in ITLibMediaItemMediaKind.
    Good luck,
    Glenn

  • Folder Actions will not work - tried everything

    Recently Folder Actions simply stopped working on 10.6.4. They worked fine before then recently just stopped working.
    I've tried everything I can think of, including:
    1. completely removing enabling & disabling & enabling folder actions through the setup app.
    2. trashing folder actions plist files in user domain and relaunching
    3. disabling related launchd processes with lingon
    4. trashing launch agents in user domain and also trying to unload them in terminal
    5. trying to kill the folder actions dispatcher process in activity monitor (just relaunches, as it should)
    6. emptying system caches including dyld shared cache using cocktail
    7. doing most of the above and restarting
    It's driving me nuts. Any other ideas?
    here's some entries from syslog:
    8/2/10 9:31:37 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 6 seconds
    8/2/10 9:37:29 AM Folder Actions Setup[4403] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 9:43:37 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.enabled[309]) Exited: Killed
    8/2/10 9:46:23 AM [0x0-0x3a03a].com.apple.systemevents[360] com.apple.FolderActions.enabled: Already loaded
    8/2/10 9:52:07 AM Folder Actions Setup[1083] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 9:52:16 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 7 seconds
    8/2/10 9:53:02 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 1 seconds
    8/2/10 9:56:18 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 10 seconds
    8/2/10 10:00:58 AM Folder Actions Setup[2190] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 10:01:01 AM com.apple.FolderActions.enabled[2236] launchctl: Error unloading: com.apple.FolderActions.folders
    8/2/10 10:01:30 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 10 seconds
    8/2/10 10:01:42 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 9 seconds
    8/2/10 10:05:03 AM sudo[2622] lryter : TTY=ttys000 ; PWD=/Users/lryter ; USER=root ; COMMAND=/bin/launchctl unload -w /Users/lryter/Library/LaunchAgents/com.apple.FolderActions.enabled.plist
    8/2/10 10:10:25 AM Folder Actions Setup[676] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 10:10:27 AM com.apple.FolderActions.enabled[680] launchctl: Couldn't stat("/Users/lryter/Library/LaunchAgents/com.apple.FolderActions.folders.plist"): No such file or directory
    8/2/10 10:10:27 AM com.apple.FolderActions.enabled[680] nothing found to unload
    8/2/10 10:10:38 AM com.apple.launchd.peruser.501[268] (com.apple.FolderActions.folders) Throttling respawn: Will start in 8 seconds
    8/2/10 10:13:17 AM sudo[943] lryter : TTY=ttys000 ; PWD=/Users/lryter ; USER=root ; COMMAND=/bin/launchctl unload -w /Users/lryter/Library/LaunchAgents/com.apple.FolderActions.enabled.plist
    8/2/10 10:14:01 AM com.apple.launchd.peruser.501[268] (com.apple.FolderActions.folders) Throttling respawn: Will start in 4 seconds
    8/2/10 10:14:14 AM com.apple.launchd.peruser.501[268] (com.apple.FolderActions.folders) Throttling respawn: Will start in 1 seconds

    I finally go Folders Action to work, after being unable to use it even for a simple beep for years now.
    Here is what I did:
    1. Changed permissions to 755 for the following folder and two contained files (note that 775 didn't work for me)
    ~/Library/LaunchAgents/
    ~/Library/LaunchAgents/com.apple.FolderActions.enabled.plist
    ~/Library/LaunchAgents/com.apple.FolderActions.folders.plist
    2. Changed the following lines within ~/Library/LaunchAgents/com.apple.FolderActions.enabled.plist (using TextWrangler)
    from:
    <key>OnDemand</key>
    <false/>
    to:
    <key>OnDemand</key>
    <true/>
    Prior to the permissions changes within #1 above, the value of <true/> kept getting changed back to <false/> by something in the system... and though
    there was improvement by the permissions changes, the following console message appeared until false was changed to true.
    com.apple.FolderActions.enabled[4127] launchctl: Error unloading: com.apple.FolderActions.folders
    At this point true is staying true, and not being changed by unknown forces to false, and the above message is not appearing.
    3. The only other thing I did prior to #1 and #2 above, was to run the script (unsaved),
    tell application "/System/Library/CoreServices/Folder Actions Dispatcher.app" to tick
    This little tell line caused something to occur where my Folder Action surprised me and worked for the first time though it took about 30 seconds and was erratic,
    sometimes performing, sometimes not, though if I would do move something into the folder to trigger the action that should occur, and did not occur, then at the point
    running the above tell line or script would cause the action to occur.
    4. At this point I don't fool with the tell line or script from #3, and it seems that systemevents has gotten involved, as well as launchd, and with my simple Folder Action script
    I'm getting the folder action within 10 seconds compared to 30 to 45 if ever seconds.
    5. This is still too early to tell if this is the wonder pill I've needed since Leopard, and now Snow Leopard (and maybe Tiger as well: I forget when I even tried Folder Actions).
    There was a time when I moved things around, so that the items normally found in the former AppleScript folder, were placed elsewhere in subfolders, so I don't know if that lead to this...
    because I could get Folder Actions to work on Macs in the Applestore, but not my own Mac. Watching the console messages was helpful. I don't think it's a big concern that
    deprecated messages are found sometimes. That's a just a normal part of the constantly rebuilding of things that goes on. It's more like a reminder that we've got an upgraded
    OEM part were going to start using, and the older part won't be available after such and such date, so program accordingly, and in the meantime drive.

  • Can I change Type Action "URI" to Type Action "Launch" in LiveCycle Designer ES 8.2?

    I am trying get a link in my pdf form to launch Windows Explorer to a folder or just launch the excel file in MS Excel. I used LiveCycle Designer ES 8.2 to create the form. My problem is most of my users have Chrome as their default browser. When they click on the link on the form it opens in the Chrome browser. If IE is their default browser it opens Windows Explorer so they can open and edit the file. But like I said, most of my users are using Chrome. In my search for a fix, I saw a discussion (see below) where they are trying to launch a pdf file with "Launch" vs. "URI".
    So I was wondering, can I change Type Action "URI" to Type Action "Launch" using LiveCycle Designer ES 8.2?
    ***Discussion link***
    MS Word 2007+ - can it encode hyperlinks using the PDF Action Type "Launch" instead of "URI" when publising a ".docx" fi…

    I have a link in the LiveCycle form that can be clicked by the user to open Windows Explorer and modify the file. The xml for the link is below:
            </draw>
             <draw name="Text" x="35.394mm" y="104.458mm" w="167.593mm" h="4.171mm">
                <ui>
                   <textEdit/>
                </ui>
                <value>
                   <exData contentType="text/html">
                      <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p style="tab-interval:0.5in;tab-stops:right 0.5in right 0.667in;font-family:'Times New Roman';text-decoration:none;letter-spacing:0in">Add new project to the Courseware Revision Status spreadsheet<span style="xfa-spacerun:yes"> </span><a href="file://///52TYMX-AS-TM040/FPMI_Common/Project Time Tracking/CW Revision Status"><span style="font-size:10pt">S:\Project Time Tracking\CW Revision Status\</span></a><span style="xfa-spacerun:yes"> </span></p></body>
                   </exData>
                </value>
                <para vAlign="bottom"/>
                <traversal>
                   <traverse ref="CheckBox1[20]"/>
                </traversal>
             </draw>
    I do not have access to notepad++ (hex editor) and as such am trying to make hex changes with Adobe LiveCycle if possible.
    Thanks for your response.

  • Folder Action + Move Finder Items = Zero KB files

    I've got a folder action set that is supposed to run the Automator Action "Move Finder Items" on any file that gets placed in a specific folder (called "Folder A") and move it to "Folder B". I'm having an issue with larger files though.
    As soon as I begin to transfer the file to "folder A" , the folder action runs and results in a "Zero KB" file in "Folder B".
    Is there any way to keep the Folder Action from triggering until the file has completely copied to the folder with the Folder Action attached ("Folder A")?
    A side note: I have this same folder action running on an iMac with Mac OS 10.6.3 and it works great . (This one was made with the newer version of Automator that shipped with 10.6 vs. Automator on 10.5 which made the action I am having trouble with)
    Any input would be appreciated!

    There is a check in *Snow Leopard* to see if the items have completed their copy/download, but Leopard does not do any checking - the script is triggered immediately. You can add your own delay with a *Run AppleScript* action, though, for example:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters} -- wait for file copy to complete by testing the size of the containing folder
    set theFolders to {} -- to handle items in different folders
    set skippedItems to {}
    repeat with anItem in the input -- get a list of unique folders
    tell application "Finder"
    get (container of anItem) as alias
    if the result is not in theFolders then set the end of theFolders to the result
    end tell
    end repeat
    repeat with aFolder in theFolders
    set timeToWait to 30 -- time to wait for copy to complete
    set interval to 2 -- test every interval seconds
    set copied to false
    tell application "Finder" to set currentSize to size of aFolder -- get initial size
    repeat with timer from timeToWait to 1 by -interval -- check every interval seconds up to maximum time
    delay interval
    tell application "Finder" to set newSize to size of aFolder -- recheck size
    if (newSize is equal to currentSize) then
    set copied to true
    exit repeat -- success
    else -- update size
    set currentSize to newSize
    end if
    end repeat
    if not copied then set the end of skippedItems to quoted form of (aFolder as text) -- timed out
    end repeat
    showSkippedAlert for skippedItems
    return input
    end run
    to showSkippedAlert for skippedItems
    show an alert dialog for any items skipped, with the option to cancel the rest of the workflow
    parameters - skippedItems [list]: the items skipped
    returns nothing
    if skippedItems is not {} then
    set {alertText, theCount} to {"Error with waiting for items to copy", count skippedItems}
    if theCount is greater than 1 then
    set theMessage to (theCount as text) & space & " folders timed out"
    else
    set theMessage to "1 folder timed out"
    end if
    set theMessage to theMessage & " - copy of contents may be incomplete:"
    set {tempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {skippedItems, AppleScript's text item delimiters} to {skippedItems as text, tempTID}
    if button returned of (display alert alertText message (theMessage & return & skippedItems) alternate button "Cancel" default button "OK") is "Cancel" then error number -128
    end if
    return
    end showSkippedAlert
    </pre>
    The action will check the folder sizes, and when there is no change (or the wait times out) the input items are passed on.

  • Help with folder actions

    Automator is still a little confusing to me, I have virtually no experience, but wish to have automated emails sent when the contents of certain folders in my idisk/public folder are updated.
    First thing that confuses me is I thought automator worked with folder actions, it doesn't seem to for me and am left running an applescript to detect the changes and tell automator to send the email. This seems rather long winded and not what I'd expected.
    Second thing I can get what I've done to send emails when items are added to the folder, but not when they are modified/updated which is what I wanted. This is due to my lack of experience with scripting so any help would be appreciated.
    What I've got so far is
    '....on adding folder items to this_folder after receiving added_items
    try
    tell application "Automator".....'
    how do I change this to do what I want ?

    Winston,
    You need to save the Automator workflow as a folder action plug-in with it attached to the folder of interest. You start this process by selecting the "Save as Plug-in..." command under the File menu. You will then have to enter the name you want to use for the plug-in and select the "folder action" from the "Plug in for:" drop-down menu. An "Attached to Folder:" drop-down menu will appear and you can select one of those presented or navigate to something else by selecting the "Other..." choice (which you will have to do to get to your idisk/public folder).
    Once this is done then every time something is added or modified within the watched folder the Automator workflow will be triggered and run. In your case, because the folder is on iDisk, it will only be triggered when you are logged into your iDisk account.

  • Delaying folder action until file creation is complete

    I'm trying to create a folder action that takes the output of a bounce from ProTools and then imports it into iTunes. The problem I'm having is that it takes real time (about 20 min) to create the complete ProTools file in the folder, however the script begins to execute immediately, before the bounce is complete. This gives me 1 second of audio garbage.
    Is there any way to delay the folder action until the file creation (bounce, upload, transfer, whatever) is done?
    Thanks.

    V.K. Thanks again for your help. When I look in my folder directory/library/scripts/folder action scripts, I see many scripts for images as well as scripts for closing subfolders, converting to pdf, open - show comments in dialog, and add - new item alert, however I don't see anything that was created recently (i.e. something that was created when I built my Automator workflow (folder action). The closest (to what I am looking for) Folder Action Script could find was "add - new item alert.scpt", which is an existing Apple written script, but this will not really help me. When I created my initial automator script, it created a folder and file and workflow in my homefolder/library/Workflows/Applications/Folder Actions/xxx.workflow, however I cannot open this workflow in applescript. I even tried changing the extension to .scpt. I'm not sure I can accomplish the desired result with Automator alone, but I don't think I am well versed enough in AppleScript. Thanks for your help.

Maybe you are looking for