How do I catch a copy from another network node

  • Thread starter Thread starter TonyJ
  • Start date Start date
T

TonyJ

Hello!

I use System.IO.File.Copy(exeFileServer,exeFileLocal);
and this exeFileServer is located on another computer node in the network

I want to catch the error by using try...catch if this node is not
accessible for some reason.
It might be down or something else

How is this done?

//Tony
 
Hello!

I use System.IO.File.Copy(exeFileServer,exeFileLocal);
and this exeFileServer is located on another computer node in the network

I want to catch the error by using try...catch if this node is not
accessible for some reason.
It might be down or something else

How is this done?

Have you tried using a try/catch block?
 
Hi,

| Hello!
|
| I use System.IO.File.Copy(exeFileServer,exeFileLocal);
| and this exeFileServer is located on another computer node in the network
|
| I want to catch the error by using try...catch if this node is not
| accessible for some reason.
| It might be down or something else
|
| How is this done?

try
{
System.IO.File.Copy(exeFileServer,exeFileLocal);

}catch(Exception e)
{
Console.Write( e.Message);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top