This content has been marked as final. Show 3 replies
Looks like rename locks itself -- the attached block solves the problem
Generally when manipulating files you used a named <cflock> instead of a scope like so:
<cflock name="#Variables.myFileName#" timeout="5" type="exclusive">
In your code in the second example I'm not sure about the function of the loop at all... I guess you are trying to delay to make sure the copy operation completes before deleting. But looping from 1 to 10 is arbitrary and depending on other concurrent processes, server speed, RAM, etc. and so basically it is unreliable.
Perhaps they mean changing from a "move" to a "copy" + "delete" resolved the problem.
> used a named <cflock> instead
Yes, consider using a more granular lock, instead of placing an exclusive lock on the server scope. Though it looks like locking was removed entirely from the final code.