Applying a folder action to thousands of folders?

I am pulling my hair out with this; I need to know the best way to do this. My client said he had "a thousand or so" eps files that he wanted bundled into specific groups, then duplicated as pdf, jpg, png and tif files, each group in its own subfolder with an excel file that lists each of the file names for each bundle. So, essentially, the structure would look something like this:
Archive of Files (all of them)Bundles (ie., singles or multiples)Type of Bundles (ie, 5, 10, 25, 50, 100, 200)Groups and excel file (ie, "62697200376 - 62697200380")Filename Folder (ie, "62697200376", "62697200377", "62697200378", etc)
filename.eps
filename.tif
filename.pdf
filename.jpg
filename.png
Insane.
Anyway, what he actually sent me was 99,997 files - not "a thousand or so". So now, thanks to applescripts and automator, I have managed to:
- separate the archive of files into bundles
- set up the types of bundles
- Group the files (no excel file just yet, that'll be last)
- run applescript to create a folder for each eps file and move that eps file into it's folder
- have a working (and tested) workflow that will duplicate and convert each eps file to a pdf and save that pdf to the same folder.
I also have folder actions that will duplicate the pdf files as tif, jpg, and png once the pdf file is saved.
How can I attach these folder actions to these folders? Specifically the filename folders? I know that you're supposed to select each folder one at a time and then click on "Folder Actions Setup" to choose the actions, but there are nearly 100,000 folders that I need to get these three actions attached to before I can run the workflow. I don't think I will survive the eminent implosion that I will suffer if I have to attach these folder actions to each of the 99,997 folders one at a time (and I definitely wouldn't meet my deadline of having all this done).

Thank you all for the replies.
So, I know I'm doing something wrong, but I just can't seem to see it. In applescript editor, I have this (based on Camelot's script above):
tell application "Finder"
    set theFolders to every folder of (choose folder) as alias list
end tell
tell application "System Events"
    repeat with eachFolder in theFolders
        try
            attach action to eachFolder using "/Library/Scripts/Folder Action Scripts/Image - Duplicate as PNG.scpt"
        end try
        try
            attach action to eachFolder using "/Library/Scripts/Folder Action Scripts/Image - Duplicate as JPG.scpt"
        end try
        try
            attach action to eachFolder using "/Library/Scripts/Folder Action Scripts/Image - Duplicate as TIFF.scpt"
        end try
    end repeat
end tell
First, I tried it without the try / end try but it kept telling me that it didn't understand the attach action message. After I added the try / end try, it goes through but the actions do not get attached and I get an error number -1708 like this:
tell application "System Events"
    attach action to alias "[removed]:Bundles:5:first copy:62697200376 - 62697200380:UPC (A).62697200376:" using "/Library/Scripts/Folder Action Scripts/Image - Duplicate as PNG.scpt"
        --> error number -1708
    attach action to alias "[removed]:Bundles:5:first copy:62697200376 - 62697200380:UPC (A).62697200376:" using "/Library/Scripts/Folder Action Scripts/Image - Duplicate as JPG.scpt"
        --> error number -1708
    attach action to alias "[removed]:Bundles:5:first copy:62697200376 - 62697200380:UPC (A).62697200376:" using "/Library/Scripts/Folder Action Scripts/Image - Duplicate as TIFF.scpt"
        --> error number -1708
The folder "First Copy" is a backup I made of some of the files; there are 200 folders in there, each containing 5 subfolders, and in the subfolder is the actual eps file. I figure if I can make something work on this small backup I can make it work on the actual folders / subfolders.

Similar Messages

  • Apple Script to automatically apply automator folder action workflows

    Hello
         I'm trying to get an applescript to automatically apply an automator folder action workflow to a folder..
         Getting applescript to apply a scpt file to a folder as a folder action is straight forward. However, it seems that scpt files are different than automator folder action workflows..
         Normally I would just script the folder action in apple script, but this is for someone that can handle automator, but not apple script coding. This whole scripting is to solve the issue of subdirectories being creating and then files or subfolders being created there after. So we need to try to get automator folder actions to propagate though..  easy enough with applescript..
    Any help would be appreciated...

    Here is the code that I needed to happen...  Maybe I just missed something in automator... but this applescript properly applies itself to subfolders, which then allows me to apply specific scripts based on folder names and locations. Also if the subfolders already exist.. the scirpt also is applied to those.
    on adding folder items to this_folder
      createlist(this_folder)
    end adding folder items to
    on createlist(item_list)
              set ActionScript to " REMOVED FOR PUBLIC DISPLAY:ApplyScriptSubfolders.scpt"
              set the the_items to list folder item_list without invisibles
              set item_list to item_list as string
                   repeat with i from 1 to number of items in the the_items
                     set the_item to item i of the the_items
                                       set the_item to (item_list & the_item) as alias
                                       set this_info to info for the_item
                                       if folder of this_info is true then
                              tell application "System Events"
                                                                          display dialog "Attching script to " & the_item as text  --
                                     attach action to folder (the_item as text) using ActionScript
                                                           end tell
                                my createlist(the_item)
                                       end if
                   end repeat
    end createlist
    I appreciate your help.. if you now know what has to happen and have a shorter way of doing so, please do so..
    Thank you again,

  • How to set up Automator Folder Actions?

    I have set up and sucessfully tested a workflow which sends any file found in a particular folder to the "paperless" app, then moves all files to a different folder called "Archived attachments".
    HOWEVER as a folder action,  nothing happens when a file is put into the folder. The file just sits there in the folder.
    To create a folder action I opened  "new folder action" in Automator, then dragged and dropped the working workflow file into the workspace, then set "Folder Action recieves files and folders added to" the appropriate folder, let's call it "Attachments".
    Just to complicate things, the files are placed into the "Attachments" folder using an applescript that captures all pdf mail attachments. This applescript works succesfully.
    So, where could I be going wrong?
    The working workflow "Attachments.workflow" consists of:
    Get Specificed Finder Items
    Make Sequential
    Get Folder Contents
    Open Finder Items
    Get Folder Contwents
    Label Finder Items
    Get Folder Contents
    New Dated Folder
    The erronious Folder Action consists of:
    Run Workflow (Attachments)
    In folder actions setup:
    "Enable Folder Actions" is ticked
    "PDF Attachments" folder is ticked
    "Attachments_folder.workflow" script is on.

    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.

  • Failed to attach workflow to "Downloads" as a folder action

    Hi, everyone
         I am trying to move the files and folders I get via AirDrop to a folder named AirDrop with automator. I use the following workflow
         Folder Action receives files and folders added to Downloads
         Get Specific Finder Items (Downloads)
         Get Folder Contents (Un-tick Repeat for Subfolder found)
         Filter Finder Item ( All of following are true : Name is not AirDrop )
         Move Finder Item ( To AirDrop : tick Replace existing files)
         It works perfectly fine when I tries to run it step by step or using Run button. But it doesn't work when I add a file or folder to the Downloads folder. So, I tried to remove the .workflow file from the Folder Actions and re-install it again. When I do that, this
    occurred.
         Please help me. Thanks in advance

    a rough draft of the script that answered my own question:
    tell application "Microsoft Word"
      activate
    end tell
    tell application "System Events"
      delay 0.5
      keystroke "a" using command down
      tell application process "Microsoft Word"
      click menu item "Page Setup..." of menu "File" of menu bar item "File" of menu bar 1
      delay 1
      click pop up button 3 of window "Page Setup"
      keystroke "Any"
      delay 0.5
      keystroke return
      delay 0.5
      keystroke return
      delay 1
      click menu item "Print..." of menu "File" of menu bar item "File" of menu bar 1
      delay 1
      tell menu button "PDF" of window "Print"
      click
      click menu item "Create Booklet" of menu 1
      end tell
      end tell
    end tell

  • How to monitor contents of sub-folders in a Folder Action?

    Hello. I am wondering how I might read a folder's contentModDate within Terminal, i.e. from the command line and/or within a Folder Action.
    This is the situation: I am running Periscope Pro (PP) for motion-detected videos, which by default, places them within the user's ~/Movies/com.zipzapmac.Periscope-Pro folder. Within that folder, PP creates a folder with it's name based upon (a) machine name and (b) primary MAC address. For example, we'll pretend this folder is called MacPro(001122334455). Then within that folder, as PP is running in motion-detection mode, it creates a new folder based on the current date and then, within that, places videos when motion is detected. Very straight-forward and it works just fine.
    What I would like to do is have a folder action that (a) detects when any new folder or file is created within MacPro(001122334455) and (b) sends me a text-message via Apple Mail.
    If the MacPro(001122334455) folder is empty, I can create a Folder Action that will detect the creation of a sub-folder when the first motion-detected video is created and that successfully sends me a text-message, BUT if a second video is created later within the same date-named folder, I will not get a message. I would get a text-message on the following day as a new folder is created within MacPro(001122334455) that signals the first motion-detected video of the day, but again not subsequent videos on the same day.
    The text-message via Apple Mail I have easily scripted via Applescript and it works flawlessly.
    Since Folder Actions only work upon a single pre-defined folder and not on sub-folders, I can never get automatically notified via text-message of second/third/fourth/etc. motion-detected videos as they're created... only the first one of each day.
    So, I'm wondering whether there's a different way, perhaps through launchd that I might script this process. I'm thinking that if the contentModDate value of the MacPro(001122334455) folder could be read, compared with the last known value, and then---if different---execute the Applescript. OR PERHAPS I'm going about this all wrong and you might have another, better idea?
    I'm open to suggestions.
    -- David (da2357)

    Well, I found a solution that does not use a Folder Action. Since Folder Actions will only work upon the specified folder and not upon the contents of any sub-folders, I needed a different solution.
    First, I launched Terminal and created a new file called monitorPeriscope. I set executable permissions (chmod 700 monitorPeriscope). The contents of the file:
    #!/bin/bash
    # monitor the size of a specified folder and
    # when the size increases, run an applescript
    # copyright 2013, david dot allie at me dot com
    # you are welcome to use this script, but please attribute authorship.
    # CONSTANTS
    WATCHFOLDER="/users/xadmin/movies/com.zipzapmac.Periscope-Pro"
    SIZEFILEONE="/users/xadmin/.bin/foldersizeone"
    SIZEFILETWO="/users/xadmin/.bin/foldersizetwo"
    MYAPPLESCRIPT="/users/xadmin/documents/dropbox/programming/applescript/motion_de tected_text.scpt"
    # START
    # calculates current size of watchfolder, saves to sizefiletwo, then
    # performs a diff operation, result which is evaluated in if statement,
    # and if different, runs applescript, and copy sizefiletwo to sizefileone
    du -h -k -d3 -c $WATCHFOLDER | awk 'END{print}' | awk '{print $1}' > $SIZEFILETWO
    diff --brief $SIZEFILEONE $SIZEFILETWO
    if [ $? -eq 1 ]
      then
        osascript $MYAPPLESCRIPT
        cp -f $SIZEFILETWO $SIZEFILEONE
    fi
    exit 0
    Next, I created the following Applescript, replacing Some User, [email protected] and the text address of [email protected] below with my real values.
    using terms from application "Mail"
    tell application "Mail"
    set theName to "Some User"
    set theAddress to "[email protected]"
    set theContent to "Motion detected in OFFICE."
    set newMessage to make new outgoing message
    tell newMessage
    make new to recipient at end of to recipients with properties {name:theName, address:theAddress}
    set visible to true
    set sender to "[email protected]"
    set subject to "ALERT "
    set content to theContent
    send newMessage
    end tell
    end tell
    end using terms from
    Next, using the touch command, I created /users/xadmin/.bin/foldersizetwo and /users/xadmin/.bin/foldersizetwo as needed for the bash shell script (touch /users/xadmin/.bin/foldersizeone and touch /users/xadmin/.bin/foldersizetwo).
    Next, still in Terminal, I navigated to ~/Library/LaunchAgents and created the following plist using nano, which I named com.xadmin.monitorPeriscope.plist:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>Disabled</key>
              <false/>
              <key>Label</key>
              <string>com.xadmin.monitorPeriscope</string>
              <key>ProgramArguments</key>
              <array>
              <string>/users/xadmin/.bin/monitorPeriscope</string>
              </array>
              <key>RunAtLoad</key>
              <true/>
              <key>StartInterval</key>
              <integer>900</integer>
    </dict>
    </plist>
    Finally, all that was needed was to log out and then log back in. Once I launched the Periscope Pro app and started the motion-detection mode, I left my office... and within fifteen minutes I received a text message indicating that motion had been detected in my office. In the plist above, I set a StartInterval of 900 seconds, which corresponds to 15 minutes. I can reduce it down to 300 seconds (5 minutes) without it adversely affecting performance, but I'm going to leave the setting where it is for now.
    So, I solved my own problem and I'm pleased with the results.
    -- David

  • Need help creating a folder action for creating folders based on filenames.

    I want to create a folder action that will monitor a folder and every time a file is added to the folder it will create a directory using the filename (minus the extension) and move the file the that directory

    on run {input, parameters} -- create folders from file names and move
      set output to {} -- this will be a list of the moved files
      repeat with anItem in the input -- step through each item in the input
        set {theContainer, theName, theExtension} to (getTheNames from anItem)
        try
          set destination to (makeNewFolder for theName at theContainer)
          tell application "Finder"
            move anItem to destination
            set the end of the output to the result as alias -- success
          end tell
        on error errorMessage -- duplicate name, permissions, etc
          log errorMessage
          # handle errors if desired - just skip for now
        end try
      end repeat
      return the output -- pass on the results to following actions
    end run
    to getTheNames from someItem -- get a container, name, and extension from a file item
      tell application "System Events" to tell disk item (someItem as text)
        set theContainer to the path of the container
        set {theName, theExtension} to {name, name extension}
      end tell
      if theExtension is not "" then
        set theName to text 1 thru -((count theExtension) + 2) of theName -- just the name part
        set theExtension to "." & theExtension
      end if
      return {theContainer, theName, theExtension}
    end getTheNames
    to makeNewFolder for theChild at theParent -- make a new child folder at the parent location if it doesn't already exist
      set theParent to theParent as text
      if theParent begins with "/" then set theParent to theParent as POSIX file as text
      try
        return (theParent & theChild) as alias
      on error errorMessage -- no folder
        log errorMessage
        tell application "Finder" to make new folder at theParent with properties {name:theChild}
        return the result as alias
      end try
    end makeNewFolder
    This script almost does what I need except for the fact that it screws up on files with periods in them
    for example
    1.2.3.4.txt
    will create the directorys 1, 2, 3, and 4 instead of 1.2.3.4

  • Managing and distributing Folders with folder actions to a group of users?

    I want to set up a server for a camera club on a SnowLeo Server running on a MacMini. We want to collect images every month from users who want to participate in a club competition and are looking into the FileSharing service on the server to collect the images.
    My initial idea was to find a way of letting the Administrator automatically create folders with folder actions in every users home folder (i.e. "2010-April-Portraits"). After the user had uploaded images into it, the folder action would then rename, reformat and transport images into a central location to be processed further.
    Is this a good way of collecting data, and if yes - how do I let the Admin create and distribute these folders with the appropriate actions?
    Best regards,
    Kjell Are Refsvik
    Norway

    Hi,
    I want to purchase a Macmini with SL Server and create a photo competition solution for a camera club. The solution needs to be able to accept uploaded images and the solution needs to let the user associate a set of images to a competition and from there the solution needs to make sure that the filename, format, size and embedded metadata is correct before storing and processing them further. Friends I have talked to say I need a classic CMS solution so I may need to investigate instead of my planned AppleScript/Automator solution.
    Also - thank you for offering to develop, but I had kinda planned to do this myself to build some knowledge and also get to know the server better.
    Anyone else using the SnowLeo server for a solution like this?
    Kjell Are Refsvik
    Norway

  • Sync folders in folder actions

    I'll explain :
    Is there a way to tell acions folder to copy files over whenever a file is modified ?
    Thanks
    MJ

    A folder action is triggered when something is added (or removed) from the attached folder - there isn't a variation that will activate when a file is modified. Another option would be to schedule a periodic script that uses the rsync shell utility.

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

  • Folder Action works, but only once

    Attached a Folder Action to a folder in my Home directory, to upon dropping folders/files to that folder will change the Folder Views to 128 Icon size (and subfolders) - works once, then next time I drop a folder into that folder doesn't do anything.
    Here is the script attached via Automator to that folder
    on adding folder items to this_folder after receiving added_items
    tell application "Macintosh HD:Users:USERNAME:Library:Workflows:Applications:Folder Actions:MAKE 128.app"
    open added_items
    end tell
    end adding folder items to
    Is there something I'm doing wrong? Folder Actions are still Enabled for said folder but dropping into that folder does not produce these results - something happens in the menubar but that's it.
    Message was edited by: nickdynamite

    You might try this approach, using the following workflow...
    1) *Get Specified Finder Items* -- press the "+" sign, navigate to the target folder and choose it.
    2) *Set Folder Views* -- move the icon slider to 128, etc., and check "Apply Changes to Sub-folders."
    From Automator's File menu select Save As Plug-in > Plug-in for: Folder Actions.
    The AppleScript, located in the User > Library > Scripts > Folder Action Scripts folder, can then be modified:
    on adding folder items to this_folder after receiving added_items
    tell application "Macintosh HD:Users:username:Library:Workflows:Applications:Folder Actions:Make 128.app"
    run -- 'run' replaces 'open added_items'
    end tell
    end adding folder items to
    This has worked for me consistently (so far) using Mac OS 10.4.11; not tested in Leopard. Your results may vary.
    Good luck.

  • Issue with folder action created with automator

    Hello all,
    I'm having an issue with folder actions that i created with automator and it's driving me crazy. Apple says they can't help with things created by the user so this is my only shot at figuring this out.
    Running a Mini 2.3G quad i7, 8GB ram on OSX Mavericks 10.9.2
    My goal is to set up an action to add text to the filename of a file placed into a particular folder. So I open automator and choose folder action. Then I choose the folder I want the action applied to at the top. Then I go to Files and Folders in the library and choose rename finder items and drag it over to the workflow. I select add text, then add the text I want added to the file name and choose before name because I want the added text to preceede the original filename text. I save it then go to the folder I applied it to and right clikc go to services then folder actions and verify that the service is attached to that particular folder and it is.
    Should work right? No. When I place a file in that folder the action runs and adds the text like I want it to... but then it starts to add it over and over again in an infinite loop. It also adds a file with the extension .ds_store to the folder that also has the name added over and over.
    I've tried deleteing all the folder actions and even deleteing all the folder actions themselves saved by the automator in the workflow file in the user library.
    I'm stumped... no idea what to do. A while ago I had used the automator to batch rename files and it worked perfectly. I tried the same steps i listed above to set this action up on a machine in an Apple retail store and it worked... so I know I have the set up right.
    Any help is greatly appreciated.
    Thanks,
    Justin

    Hi JK257
    This is why it happens:
    The folder action is looking for new items in the folder. You drop in a file called "File1". So it renames it "sometext File1". Then it sees this new file called "sometext File1" and thinks "Hey, this is a new file - I'll call it 'sometext sometext File1' because I have to rename every new file." Then it sees this new file called "sometext sometext File1" and thinks...
    You get the picture.
    (the .ds_store is a normally hidden database file which is getting revealed by the same process.)
    The solution is to move the files out of the renamer folder into a receiving folder after they have been renamed:
    Hope this helps,
    H

  • Smart Folder that shows the biggest folders?

    Hi all,
    I want to know which folders on my harddrive are the biggest in size.
    Thus, I made a new smart folder with the criteria
    Kind = Folders and
    Size Greater than 200 MB
    The result is empty.
    There are, however, folders that contain 200 MB and more on my harddisk which can be proven easily by activating the "Calculate all size" option in the View options (Command-J).
    What am I doing wrong?
    Thanks,
    Stefan.

    The problem is that when you select the Size option, what is REALLY being used is a metadata attribute called "kMDItemFSSize"--which seems to refer to File Size, an attribute of files, but not a metadata attribute that is listed for folders. There is no clue that it doesn't apply to folders, but it doesn't. You could probably make an Automator action to do what you want, but WhatSize probably does it better any way.
    Francine
    Francine
    Schwieder

  • Folder Actions still unreliable in Snow Leopard

    Hello everybody,
    I used to give folder actions a try in Tiger, then in Leopard and now in Snow Leopard I still see that in terms of reliability, folder actions still seem to be useless - at least to me.
    Yesterday I created a folder action in Automator which is intended to just *move files* that have been downloaded with Safari in the Downloads folder, to another folder, nested in the Downloads folder itself.
    So for example when I download a file with a .rar .dmg .iso .zip extension, it should move it to the next folder "archives" where a similar folder action awaits the files to be moved according to their "type" in the next folders (rar, dmg, iso and zip). The same thing for images, music and movies.
    It works for a few files, but then for some reason (the holy Apple gods know why) it gets picky or lazy if you like : it just doesn't work 100%. I can manually drag out the files it didn't "act upon" and redrop them in the folder - still no joy.
    And I noticed a flickering or blinking of the finder window. Really weird....
    So I fire this out in hope that some of you share the same frustration
    Maybe somebody knows how to fix this.
    Or maybe I'm doing something wrong..
    cheers
    X
    Message was edited by: xanvertin

    Thanks for the quick and helpful reply!
    I also thought that incomplete files downloaded through Safari could mess up things, but it seems to be a general issue the way the folder script "asks for the files". I tried the same folder action in a different folder, where I manually drag 'n dropped several files manually in it - still no joy. 49 out of 100 files just stayed put. It's so frustrating.
    And I believe such thing as folder actions is tremendously useful if it "just works" - I download so many files on daily basis at my University - wether it is PDFs, photos, music whatever - that after a while the whole idea of "Stacks" and Coverflow in the Downloads folder just becomes a real useless pain. You just can't find anything through browsing. Sure you could search - if you know what to search for - but almost every file nowadays in the Net has a cryptic file name. So if I look for "applepie" the real file turns out to be "3934iiijpjfedi923.jpg
    folder actions could at least help us get things more "organized"
    but..
    nope.
    I just found out that my folder action has a problem with "hidden extensions"...
    oh dear...
    i think I'll stick to my wasted hours of cleaning up my mac on sundays...

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

  • Creating a simple Folder Action

    Hello, I am trying to make a simple folder action.
    Well first off I have all my applications stored in the "application" folder (Mac MD>Applications) and I have aliases to all the apps stored in a separate application folder in which I have arranged the apps by type. One folder I have is called "new apps" (Mac HD>Users>Me>Applications>New Apps) it contains obviously new applications I have downloaded and have yet to try out.
    *What I want to do is whenever I drag a new application to the new apps folder I want it to 1) make an alias of that application and then 2) move the application to my actual "applications" folder.
    I went to automator and selected "New Aliases" and selected the new apps folder for its location to be made, and then followed it by "Move Finder Item" and selected my applications folder. I then saved it as a folder action attached to my new apps folder... It doesn't work. Yes folder actions are enabled. Is there something else I need to do for the folder action to actually pass the new files added into the folder into the script? thank you much
    Sean

    Spotlight can search for a color label but you must make that an active search criterion. Open a new Smart Folder in the Finder. Click on the + button to the right of the Save button. From the drop down menu that displays "Kind" select Other. Scroll down the list until you find the "File label" entry and then check the box to the right of the item. Click Close button. Now you should see the drop down menu has the "File label" selection followed by the color options. Select the "Green" color.
    Now, Spotlight will find files with a green label, but it may not display folders with the green label. I've not tested that. If it does not locate folders with a green label, then you will need to set the color of the files in the green labeled folders to the green label.

Maybe you are looking for

  • Is a text editor really better than Dreamweaver?

    Hi Everyone, I've been looking through several different web design forums and I'm now stuck with a question. Why do some people swear by using only a text editor to put their website together and totally discount programs such as Dreamweaver? I find

  • Which filter i can use to identify text CYM at work 100% black ?

    Which filter i can use to identify text CYM at work 100% black ? That's may problem: I have one work 100% black (book), end fill texts may include CYM, how to identify them using a filter (Shift+ctrl+x) Thak's

  • Creating websites that display iCal (ics) files?

    Hello, Does anyone have any information about creating webpages that can imbed ics files? When you publish a calendar from iCal to .Mac, it automatically makes a dynamic website that has an up-to-date version of the calendar that I've created in iCal

  • Podcast library non-functional since upgrade

    Hi, Seven days ago, I updated iTunes. For two days(Sunday and Monday), iTunes would not start, saying it could not find my library (which is on an external hard drive). On Wednesday, it found my library, but not my podcasts. On Thursday, it found my

  • Clearcase Integration with eclipse

    Hi, I am new to Ration ClearCase Tool. I would like to know how to configure Eclipse 3.2 with clearcase and how to checkin files, build from eclipse itslef . Any body can please give me some information