Don’t underestimate the My object

by Admin 8/2/2005 1:06:00 AM

Need a file from a secure network share?  Trying to actually understand the NetworkCredentials classes?  Good freakin luck!
I went through the snippets, searched google, and read the MSDN library cover to virtual cover before I just dialed in.
My.
Computer.
Network.
DownloadFile?  Does it have an overload with username and password?
Well I'll be a son of a ...
Final code:

My.Computer.Network.DownloadFile("\\192.168.1.3\share\point\test.xls", "c:\text.xls", "user", "password")

Works like a charm.

Tags:

VB

Comments

Comments are closed

About the author

Bill Sempf Bill Sempf
Author of C# All In One for Dummies (among other things)

E-mail me Send mail

Calendar

<<  July 2010  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar

Pages

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Sign in