Hi everyone,
i was working on a project lately where my manager asked me to develop a vb application that can download files of the website
<a href="http://apps1.eere.energy.gov/buildings/energyplus/cfm/weather_data.cfm">http://apps1.eere.energy.gov/buildings/energyplus/cfm/weather_data.cfm</a>[<a href="http://apps1.eere.energy.gov/buildings/energyplus/cfm/weather_data.cfm" target="_blank" title="New Window">^</a>]
Internally.
i was thinking if i can make a form that display all downloadable files on the website with a checkBox next to every file so that the user can check which files he wants to download and proceed.
please help I’ve been searching the web for last three days and can't find anything

Recommended Answers

All 3 Replies

I'm going to guess that you're not familiar with VB much?

Here is some sample code to actually Ping/Download/Upload from a website

If My.Computer.Network.Ping("www.anywebsite.com", 1000) Then
  		MsgBox("Server pinged successfully.")
	Else
  		MsgBox("Ping request timed out.")
	End If

	My.Computer.Network.DownloadFile _
    	("http://www.anywebsite.com/downloads/anyfile.txt", _
    	"C:\Documents\anyfile.txt")

	My.Computer.Network.UploadFile( _
	"C:\Documents\anyfile.txt", _
	"http://www.anywebsite.com/uploads/")

Obviously you can define what folder to save to/upload from etc, hope this helps.

As for listing the files from the website, i've never had to do it. Personally, I would look at creating a small database (if possible) to hold information about the downloadable files on the system with a URL field pointing to the location of the file which can be selected via a database query and the URL returned to the user or even redirected automatically on the click of a button.

- Jordan

Thanks Jordan, i'm still thinking of more ideas perhaps something like reading the html source code of the page and pick the Links and identify the downloadable files. But your idea also is a great help. thanks

you could store a php file on the server which returns the list of files which are in a given directory and requesting that list with your application.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.