Hi,
I would like to implement a console app which should copy a specific folder from server A to server B. Is there a way to do this?
Best Regards.
Console App - How to copy folder from one server to another?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Parveen SiwachRank #6,758 · 257 reputationPosted May 28, 2013, 12:56 AM EDT
If you can copy the file in Explorer, the File.Copy method will work.
And for other network, the following code will work:
using (new NetworkConnection(@"\\server\read", readCredentials))
using (new NetworkConnection(@"\\server2\write", writeCredentials)) {
File.Copy(@"\\server\read\file", @"\\server2\write\file");
}
yashu yash2 reputationPosted Oct 28, 2015, 9:21 PM EDT