Will data traffic go through the host application program or will be dealt remotely in scenarios where C#'s File.Copy is used:
File.Copy(@"\\SERVER13\LOL\ROFL.txt", @"\\SERVER13\ROFL.txt")
Cheers n thx!
Will data traffic go through the host application program or will be dealt remotely in scenarios where C#'s File.Copy is used:
File.Copy(@"\\SERVER13\LOL\ROFL.txt", @"\\SERVER13\ROFL.txt")
Cheers n thx!
It will go through the local application. The file system does not know what the application is going to do with the bytes it reads from the share, or where the bytes that are written to the share come from.
In addition, the application does not know (in the case of DFS) if the two shares are on the same machine.
If you want to let the server handle it, you have to remotely run a copy program.
First of all you have a small bug in the path of the destination file.
Second, there are no remote copy operation. There exist a remote move operation (rename, but with a destination in other directory) like MoveFile
(see native API http://msdn.microsoft.com/en-us/library/aa365239%28VS.85%29.aspx).
UPDATED: Probably you came from unix and knows utility rcp, but it works with respect of remote shell service (rshd) and not with respect of direct file system features. You can also use PsExec utility from SysInternals (see http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx) to start some program on the remote computer, but all this is not a subject of programming.