> I have a directory watcher event gate way that looks for new files > added to the server via FTP. Each file has to be renamed with an > incrementing number. Problem is when more than one file comes in, the > files get processed at the same time and don't get the next number. > Any suggestions on how to get around this? > > Thanks > > Phil I'm not sure if the message board took my 1st post so I am reposting to make sure you get this info
I can think of two things: 1. Use cflock, this should lock the 1st process to come up and keep it until it is done especially if set the lock type to exclusive which will not allow another resource to neither read nor write during the time the lock is in effect. Read only will work too, since your problem is the two objects getting written at the same time. 2. Some sort of thread checking/processing. if you use CF 8 the new cfthread tag is available, I have not used it myself, but I'm sure you can find info on how to use it on the live docs site. If that is not an option and you have some Java programming skills you could write a little Java in cfscript tags and create the threads. I'm sure there's a .NET equivalent as well, again you need CF 8. If you are not into using .NET or Java, the 1st option may be your best bet. --JW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322292 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

