Reputation: 9309
i want to create a small c# application. there is a text box and a button in form. if anyone enter a network path for a file and press the button, then the application must copy that file to a folder within that system. How can i do this.?
How to access a network path and how can i copy the file in that path to the system??
Upvotes: 1
Views: 4378
Reputation: 3379
You can use the OpenFileDilog class in .net to browse through the files.
Also you can visit these links for Copy and other functionalities.
http://msdn.microsoft.com/en-us/library/cc148994.aspx
http://msdn.microsoft.com/en-us/library/system.io.file.copy(VS.71).aspx
Upvotes: 7
Reputation: 25505
Net work paths are accessed by there full UNC ie \Server\Share\drive\file. As long as you have credentials to access them. You can use system.io.file.copy to move the files.
Upvotes: 1