Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy file from one server to another

Status
Not open for further replies.

adev111

Programmer
Jul 8, 2004
44
0
0
CA
Hi there,

I have a windows service which should copy the file from one server to another. Suppose I created an xml file using xmltextwriter on server 1 location C:\tempp\test.xml, I want the service to copy this file to another server. say another servers C:\inetpub\ How am i suppose to handle the IP address. Is this do-able or not? Would someone please advise.

Thanks
 
As long as you have permission, simply use the full UNC path to the other server.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
hi, could u please tell me if there is any similar (UNC)example. i googled it, but in vain!
 
[tt]System.IO.File.Copy("\\server1\share\folder1\myfile.txt", "\\server2\share\folder2\", true)[/tt]

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top