Network paths (UNC format) have backslashes, not forward slashes.

"\\SomeComputer\SomeDirectory\SomeFileName"

I assume that you have the requisite permissions on the other computer
to copy the file.

On Jun 18, 6:35 pm, yogs <[email protected]> wrote:
> Hi,
> I am trying to copy a file using File.Copy as follows:
> File.Copy("C:\Documents and Settings\Chains\Desktop\config.txt", "c:
> \backup1\aa.txt", True)
>
> it works fine.
>
> But when I am giving network path of localhost
> File.Copy("C:\Documents and Settings\Chains\Desktop\config.txt", "//
> comp2/c/backup1/aa.txt", True)
>
> Its giving error: network path not found.
>
> Please help me to solve this problem, as I want a remote transfer of
> file.
>
> Thanks,
> Yogs

Reply via email to