On 10/3/05, Tim <Tim.Ferrell / s0nspark.com> wrote:
> I've split it up a bit and discovered that the exception is thrown when
> File.unlink tries to remove files in the folder after the copy.
>
> Any other ideas? Things to check or try?

I can make a couple guesses (from similar issues I have previously encountered):

Something somewhere is accessing one or more of the files in the
original tree, the script itself may have a handle or current
directory set where you are trying to delete. If the problem was more
random in nature, a local indexing utility or virus scanner could also
be causing the problem.

Microsoft has a utility open handle (oh.exe) from their resource kit,
which can be downloaded from their web site (sorry I do not have the
link handy). You may want to try running it against the file/directory
when the unlink fails to see if it provides any clues.

Good luck
Patrick