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.

Similar Messages

  • Running multiple batch actions on the same folder? One Click?

    We run Actions on a group of images using CS4 with the File->Automate->Batch function. We use this to take, for example, 200 images from a set folder and run an "Action" to create a rendered 2D design and save it in a different location to the source image and add an extension to the file name, leaving the source image unaltered. 
    The problem is that we then require to run this 20 times, each time, the difference is :- we want it to save to a different location and the "action" used is different because it changes the colour for example.
    The desired output is:
    FROM A JPEG ---> 20 folders (named as 20 different colours) and all our images rendered (as in our action) and saved into the 20 folders
    So we have 20 versions of each image
    Currently we simply set off the different actions in a batch separately, IE. 20 lots of batches to set off.
    So for example:
    * We have 200 jpeg images in folder [A]
    * We run a Batch function to run an "action" on all 200 images in folder [A] to render into our design and add a blue colour overlay (this is all done in the action itself) and to save them to folder [B] with the extension (BLUE) added to the filename.
    * Once Photoshop finishes running this Action on the 200 images (wish it would beep or something to let you know it was finished) we then run a batch to run a different "action" on the same 200 images in folder [A] to render the design and add a pink overlay and to save them in folder [C] with the extension (PINK) added to the filename
    And so on and so forth for the 20 different actions.
    Is there a way we can instruct Photoshop to run all of these 20 actions (one after the other in a queue as it where) without having to "Babysit" Photoshop and ask it to run each one off ourselves manually?
    Would we have to use JavaScript for this? We have no experience with JavaScript at all.
    We are currently using Photoshop CS4, is there a easier way to do this on CS5 or CS6?
    Kind Regards and Thanks in advance
    Steven

    Would we have to use JavaScript for this?
    I think it would be advisable but (if you don’t mind risking getting less help) you could use VB or AppleScript depending on your platform.

  • Running multiple batch actions on the same folder?

    We run Actions on a group of images using CS4 with the File->Automate->Batch function. We use this to take, for example, 200 images from a set folder, run an action to change them into a different colour and save in a different folder, we need to do this 20 times on the same images running a different script each time to change them into a different colour and save them in the same folder (with different file extensions)
    Is there a way we can instruct Photoshop to run all of these 20 scripts (one after the other in a queue as it where) without having to "Babysit" it and ask it to run each one off ourselves?
    Kind Regards
    Steven

    Do you use Photoshop in French?
    Because Pierre has mentioned that Actions are called »Script« in French, but I think you are referring to Actiond and what I think you need in this case is a proper Script (in JavaScript preferably).
    This Script could run Actions and hanlde the saving with additional name components to avoid overwriting etc.
    You could ask for help over at
    http://forums.adobe.com/community/photoshop/photoshop_scripting

  • PowerShell using start job to run multiple code blocks at the same time

    I will be working with many 1000’s of names in a list preforming multiple function on each name for test labs.
    I notice when it is running the functions on each name I am using almost no CPU or memory.  That led me to research can I run multiple threads at once in a PowerShell program. That lead me to articles suggesting start-job would do just want I am looking
    for. 
    As a test I put this together.  It is a simple action as an exercise to see if this is indeed the best approach.  However it appears to me as if it is still only running the actions on one name at a time.
    Is there a way to run multiple blocks of code at once?
    Thanks
    Start-Job {
    $csv1 = (Import-Csv "C:\Copy AD to test Lab\data\Usergroups1.csv").username
    foreach ($name1 in $csv1) { Write-Output "Job1 $name1"}
    Start-Job {
    $csv2 = (Import-Csv "C:\Copy AD to test Lab\data\Usergroups2.csv").username
    foreach ($name2 in $csv2) { Write-Output " Job2 $name2"}
    Get-Job | Receive-Job
    Lishron

    You say your testing shows that you are using very little cpu or memory in processing each name, which suggests that processing a single name is a relatively trivial task.  
    You need to understand that using a background job is going to spin up another instance of powershell, and if you're going to do that per name what used to require a relatively insignificant amount of memory is going to take around 60 MB.  
    Background jobs are not really well suited for multi-threading short-running, trivial tasks.  The overhead of setting up and tearing down the job session can be more than the task itself.
    Background jobs are good for long-running tasks.  For multi-threading short, trivial tasks runspaces or a workflow would probably be a better choice.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Running multiple DAQ tasks at the same time

    I am trying to setup a program that would allow me to run different analog voltage waveforms on different channels.
    The rate at which samples hit each channel can be the same for all 32, but I want each to be sourced by an individual file I/O source.
    I saw the multiple tasks thread and I did try doing the multiple task approach first and needless to say got the same error.
    Saw something about software timed approach working better, but it is still a bit unclear in that post. Can i do with this card what I described above and if so is this software timing approach the way to go?
    Thanks in advance!

    Hi,
    What DAQ device and and programming language are you using, i.e., LabVIEW/CVI/.NET?   If you are new to DAQ, a great place to start are the example programs.  You can find the example programs with the Example Finder, located at Help >> Find Examples in both LabVIEW and CVI.  Once this opens, double click Hardware Input and Output >> DAQmx >> Analog Generation.  This will have many programs for generating waveforms.  I have also found a program online that might be worth looking at.  
    Continuous Multiple AO Waveforms
    Regards,
    Jim Schwartz

  • We have a PCI-6110S to run our VIs. But, we are planing to buy another card (PCI-6024E​) to run real time PID vi. So, if they are installed at the same computer, would it be a problem for LabVIEW to run both of them at the same time.

    We have PCI-6110 S series installed in our computer. We are planing to purchase PCI-6024 E series card. They will be both installed at the same computer.
    1) I am wondering if we run both of them at the same time, would we have any problem?
    2) To run PID real time, can any E series of PCI card be used?
    Thanks...

    Hello Baho,
    1) Using Traditional NI-DAQ, there could be problems with the fact that the NI-DAQ driver is not multi-threaded; meaning that while waiting for one operation to complete, the driver could cause another operation to time out. On the other hand, DAQmx is multi-threaded, and would eliminate this problem. At the time of this writing though, DAQmx does not yet support simultaneous-sampling boards like the PCI-6110S. A good solution then would be to use Traditional DAQ for the 6110S and DAQmx for the E-series board, and they would by default run in separate threads.
    2) No, using a PCI E-Series board, the LabVIEW VI would have to run in a Windows OS and would not be Real Time or run deterministically. You can run the PID program in Windows, but the
    results could be inconsistent. The advantage of a Real Time is that the OS is deterministic or that the OS allows you to tightly control or determine the maximum time any function takes to operate. This kind of control of the maximum operation time is not possible with non-Real Time OSs such as Windows.
    If you would like to get set up with a Real Time System, I suggest you contact your Technical Sales Representative.
    Regards,
    Chad Evans
    National Instruments

  • Since upgrading to Mavericks, I can't run Mail and Safari at the same time.

    Since upgrading to Mavericks, I can't run Mail and Safari at the same time.
    Either Mail will crash or the iMac will run so slowly as to be unusable. With both running, the HDD spins constantly at a high rate of speed.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the name of the crashed application or process in the Filter text field. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, look under User Diagnostic Reports for crash reports related to the crashed process. The report name starts with the name of the process, and ends with ".crash". Select the most recent report and post the entire contents — again, the text, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • Running RIPv2 and OSPF at the same time

    What are the problems with running RIPv2 and OSPF at the same time if any? I have the gear capable of that and I have been doing this for over a year now. I wanted to get rid of RIP but my couterpart is scared because he is not OSPF skilled. I do have some remote sites with old 1601s to consider. Any suggestions or recommendations.
    Thanks

    Hi Friend,
    OSPF is far better than RIP when it comes to performance and advatnages compared to RIP and no doubt in that though it is complex to implement compared to RIP but once done it is smooth.
    It is important to have a very well designed network with OSPF otherwise the behavior is unpredictable sometimes and it may not give desired results.
    Also for your low capability routers like 1601s you can put them into stub or total stubby area so that they may have less load on them.
    HTH
    Ankur

  • Why can't I run Safari and Skype at the same time without making my computer freeze up?

    I can't believe I can't run Safari and Skype at the same time without my computer freezing up, it's a MacBook Pro with Mac OS 10.6.8 and it has an Intel Core 2 Duo CPU with 2.2 Ghz and 2 Gb of RAM. Is this a hardware problem or a software problem?

    I haven't gone to the trouble of actually testing to see which uses more CPU power, but Firefox has been faster than Safari on every Mac I've ever owned.
    To see CPU usage by process, open the terminal (in Utilities) and enter 'top' at the command line. You might have to expand the window as processes don't appear in any logical order.
    It could also be hardware-related: I have late 2009 mini with similar specs and it pinwheels easily.

  • How do I view multiple inbox folders at the same time in Mail?

    I want to configure Mail to show me multiple inbox folders at the same time. I want to be able to split the screen and show in the top section unread messages, then messages I've marked with label A, then messsges I've marked with label B, then everything else in my inbox (like using the multiple inbox feature in Gmail). Is this possible?

    Just figured it out - I can select multiple messages as you suggested when I am not in full screen mode.
    So once I come out of full screen mode - then the multiple windows open.
    QED

  • Is there a way to "Quit" all running apps in dock at the same time verses right-clicking each one individually?

    Is there a way to "Quit" all running apps in dock at the same time verses right-clicking each one individually?

    IIRC, OPTION-click on the Apple icon on the menu bar and select either Restart or Shutdown. Alternatively,
    Control-Command-Eject
    Quit all applications (after giving you a chance to save changes to open documents), then restart the computer
    Control Option-Command-Eject
    Quit all applications (after giving you a chance to save changes to open documents), then shut down the computer

  • How can I run 2 Dreamweaver windows at the same time?

    How can I run 2 Dreamweaver windows at the same time on my
    PC?
    basically I have 2 monitors and I want to edit CSS on one
    monitor and have the html page open on the other so I can quickly
    look from one to another with in a split second instead of taking
    that extra time to switch back and forth using the tabs at the top,
    I know I should probably invest into a mac so i can work out side
    of the Dreamweaver application window and I will in the future but
    is there any way i can do this on my windows XP pro PC?
    Thank you
    Maurice

    Open the CSS in DW, and use F10 to open the Code Inspector.
    Place the
    latter as needed.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Random_Yggdrasil" <[email protected]> wrote
    in message
    news:gi2htb$j4j$[email protected]..
    > How can I run 2 Dreamweaver windows at the same time on
    my PC?
    > basically I have 2 monitors and I want to edit CSS on
    one monitor and have
    > the
    > html page open on the other so I can quickly look from
    one to another with
    > in a
    > split second instead of taking that extra time to switch
    back and forth
    > using
    > the tabs at the top, I know I should probably invest
    into a mac so i can
    > work
    > out side of the Dreamweaver application window and I
    will in the future
    > but is
    > there any way i can do this on my windows XP pro PC?
    >
    > Thank you
    > Maurice
    >
    >
    >

  • How to open multiple hotmail accounts at the same time ?

    Hi,
    Seems maybe normal for some people but I coming from internet explorer and with this explorer I was able to open multiple hotmail accounts at the same time, by default firefox can't do that, is there some setup to modify to open these at the same time ?
    Thanks in advance for any help.
    (Version updated 3.6.8)
    Regards,
    Chris

    You can look at one of these if you want to sign on with different identities at the same time:
    * CookiePie: http://www.nektra.com/oss/firefox/extensions/cookiepie/
    * CookieSwap: https://addons.mozilla.org/firefox/addon/3255
    * Multifox: http://br.mozdev.org/multifox/ - Different logins at the same time

  • Running Leopard and Tiger at the same time VMWare fusion/Parallels?

    Hello,
    I was wondering, is it possible to run Tiger and Leopard at the same time? Some older applications won't run properly in Leopard. The iMac came both with Tiger and Leopard (last November). It has been described elsewhere that one can install Tiger and Leopard on separate partitions and switch by rebooting. But it would be nice if one could run Tiger in Leopard like one can run Windows/Unix using VMWare Fusion or Parallels. Is that feasible?
    best wishes

    I agree with you that virtualizing Mac OS X would be great. I'm an Apple technician and it would really help with my work. But Apple's EULA does not permit the use of OS X in a VM. They changed OS X Server's EULA recently to permit it, but not the "client version".
    So your Mac can virtualize nearly any OS out there, but not OS X. And I believe (not sure) that a VM of OS X Server will only run on OS X Server.

  • What do you think about running 2 security solutions at the same time? [malware event]

    Hi all
    Is there anyone here running 2 Security Solutions at the same time?
    From what I know, few of my lecturers are running AVG and Avira, or Avira and MSE. (All free)
    According to their theory, school-licensed Symantec Endpoint Protection slows down the system too much till a point that it is slow or unable to detect the threats. 1 antivirus is not good enough, 2 antivirus would be able to detect 100% of malware.
    For my school labs computer, they are running both Symantec Endpoint Protection and Microsoft Security Essential at the same time.
    Does 2 security solutions or more helps your computer to be risk-free?
    Cheers 
    Peter
    (Current: W520 4284-A99) (Refunded: W510 4876-A11)
    =============================================
    Does someone’s post help you? Give them kudos as a reward, as they will do better to improve 
    Mark it as solved if the solution works for you, so it could be reference for others in the future 
    Dolby Home Theater v4 (ThinkMix V2)!
    http://forums.lenovo.com/t5/W-Series-ThinkPad-Lapt​ops/W520-Sound-Enhancement-Thread/m-p/451401#M155... 
    Solved!
    Go to Solution.

    Hello,
    Generally speaking, you should not run two security programs together at the same time which run in "real-time," e.g., they are actively monitoring the system.  The reason for this is that the various real-time components (on-access file system scanner, network traffic filter, and so forth) may interfere with each others operations as they both attempt to access the same bits at the same time.  This can lead to all sorts of strange system behavior, such as slowdowns, program crashes, failed downloads and lock-ups.
    If you are going to do this, make sure you disable the realtime scanning components of one program, or use one program to actively monitor the system and the other to periodically perform an scheduled or manual scans on demand.
    Regards,
    Aryeh Goretsky
    I am a volunteer and neither a Lenovo nor a Microsoft employee. • Dexter is a good dog • Dexter je dobrý pes
    S230u (3347-4HU) • X220 (4286-CTO) • W510 (4318-CTO) • W530 (2441-4R3) • X100e (3508-CTO) • X120e (0596-CTO) • T61p (6459-CTO) • T43p (2678-H7U) • T42 (2378-R4U) • T23 (2648-LU7)
      Deutsche Community   Comunidad en Español Русскоязычное Сообщество

Maybe you are looking for

  • No records in Live Authentications

    We have not updated to 1.2.1 yet and are running 1.2.0.899. the only changes made to the system was alarm settings, which was just adding emails to alarm notification in settings. Four hours after the alarm notif. change we started gettings alerts th

  • InDesign issue outputting pdf's with EPS in file.

    So just recently one of my files that has an .eps placed in it was getting errors exporting to pdf, it used to work fine in one of the files I had it. I even re-created the .eps and replaced it to see if it would work. This file had the same problem

  • Keynote Performance on Mac Mini (General Question)

    I'm hoping the awesome community of Apple users can provide some much needed insight for a guy who's been out of the Apple scene since 2005. I am looking to purchase a Mac Mini 2.3GHz quad-core i7 for the sole purpose of running Keynote on Sunday's a

  • JApplet is not working in tomcat server

    Hi All, I am having problem running applet in my tomcat server. When i ran applet using appletviewer, it is working fine. Due to applet restrictions, i signed oracle drivers jar file too. It is still saying oracle drivers not found. Could you please

  • Background job for invoice

    Hello, Not sure if this is the correct forum to post this question, if not please advise which forum to post to. We are dividing our background invoicing up in three steps in three different jobs. 1) Create only R/3 invoice (done in several jobs run