Copy File in local Network
<p>This is a web application 
I have 2 pc's: A: 192.168.1.200 and B: 192.168.1.201, I want copy from A to B, this code  working is single pc, but it's not working in network.</p>

<pre><code>protected void Button1_Click(object sender, EventArgs e)
{
    string sourcePath = @"D:\Source\";

    string[] filePaths = Directory.GetFiles(sourcePath, "*.txt");
    foreach (string a in filePaths)
    {
        CopyFiles(a, a.Replace("D:\\Source\\", "D:\\Source1\\New\\"));
       //CopyFiles(a, a.Replace("D:\\Source\\", "192.168.1.201\\Source1\\New\\"));
    }

}

private  bool CopyFiles(string Source, string Destn)
{
    try
    {
        if (File.Exists(Source) == true)
        {           
            File.Copy(Source, Destn);
            return true;
        }
        else
        {
            Response.Write("Source path . does not exist");
            return false; 
        }
    }
    catch (FileNotFoundException  exFile)
    {
        Response.Write("File Not Found " + exFile.Message);
        return false;
    }
    catch (DirectoryNotFoundException exDir)
    {
        Response.Write("Directory Not Found " + exDir.Message);
        return false;
    }
    catch (Exception ex)
    {
        Response.Write(ex.Message);
        return false;
    }
}
</code></pre>
