too many network connections
I have a program that copies files over a network connection like this:
copy the file from
\\machine\whatever.txt
to
\\anothermachine\whatever.txt
using the CopyFile function...
My program does this copy X amount of times, and after 4-7 loops, I get the errormessage: "No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept"
Is it possible to close a connection after each copy, so it will not be a problem?
Any input will be greatly appreciated!

