• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

vb.net download

I want to develop a visual basic application that can go to a website and download a file.

For example the I am going to get a link similiar to:

http://www.test.com/test.zip

I want the program with no user interaction go to the link above download the file save it, in a particuliar location, and extract the file to a seperate location. Any examples on how to accomplish this would be greatly appreciated.
0
lothos123452000
Asked:
lothos123452000
1 Solution
 
funwithdotnetCommented:
If you want no interaction, you'll need a service or startup app with a timer (trigger), or a scheduled task.

You'll need a System.Net.WebClient to browse to the site:
http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx

Then, the DownloadData method can get the file:
http://msdn.microsoft.com/en-us/library/xz398a3f.aspx

Optionally, save the .zip to the filesystem:
http://msdn.microsoft.com/en-us/library/system.io.filestream.aspx
http://msdn.microsoft.com/en-us/library/system.io.filestream.write.aspx

Finally extract the zip file. There are many option for zip file handling. Perhaps this one will work for you:
http://dotnetzip.codeplex.com/
0
 
lothos123452000Author Commented:
Thanks for the help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now