Copy a file from local drive to shared drive using C#

前端 未结 2 815
清歌不尽
清歌不尽 2021-01-07 16:07

I want to copy a file from my local drive to a shared network path.

I have tried the following way:

string remoteUserName = 
          WebConfigurat         


        
2条回答
  •  死守一世寂寞
    2021-01-07 16:24

    Network paths are accessed by full Universal Naming Convention-UNC \\Server\Share\drive\file paths. If you have these type credentials or rights to access network, You could use File.Copy method to move your files.

提交回复
热议问题