I have a small program that needs to copy a file to a fileserver. Is there a way I can test for a network connection before I try the copy? Or is it better to just handle the error?

Thank you
Ron.