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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy files on network? 1

Status
Not open for further replies.

haddaway

Programmer
Jul 6, 2005
172
SE
I have a windows services that needs to copy some files between network drives. I have access to username and passwords which have the right to access those drives. Which is the best approach to start copying these files. Any code example?

I have heard of impersonation but I don't know if that's the away - if it is then please give me one example.

thanks

Henrik
 
You can use the System.IO namespace to get access to directory and file objects for copying files. And since it is a windows service, when you set it up there should be a logon tab. Make sure you set it to log in as a valid domain user instead of the local account.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top