WCB File Downloader : Visual C#

  WCB File Downloader is a Visual C# program for downloading files. Our previous article How to download a file using command prompt explained how you can download files with CMD and avoid using any third party file downloader programs. However, we also mentioned that this process isn’t good enough to be used as a replacement for file downloaders. And so it is, because in a typical file downloader program, you just paste a URL (or the program copies it from the clipboard on its own) and click the Start Download button. On the other hand, downloading a file via CMD involves typing commands, pasting URL etc. and is a slow process. That’s why, we thought it was appropriate to develop the WCB File Downloader.

You can download WCB File Downloader here. This program requires .NET Framework 4.5

WCB File Downloader

  WCB File Downloader downloads a file and stores it at the location you specify. You just have to copy the URL of the file you want to download and click on the Download URL text box. The URL automatically gets copied from the clipboard and pasted in this text box. Then you have to click on the Browse button and specify the location (and name) for the file. After this, click on Start Download and the file will start downloading. After the download completes, the program notifies you that the file has been downloaded.

WCB File Downloader - Idle

WCB File Downloader – Idle

WCB File Downloader - Ready to Download

WCB File Downloader – Ready to Download

WCB File Downloader - Downloading

WCB File Downloader – Downloading

WCB File Downloader - Download Complete

WCB File Downloader – Download Complete

  As you can see in the above images, the download process is pretty straightforward. If you’re wondering how this program works, read the next section.

How does WCB File Downloader work?

  In this program, the actual code for downloading the file is very simple. In fact, only the following statement initiates and completes the download :

webClient.DownloadFile(uri, txtSaveLocation.Text);

Read the above statement carefully. webClient is an instance of the class WebClient (System.Net.WebClient) and DownloadFile() is a method of the same class. The DownloadFile() method takes two arguments – the URI of the file to be downloaded and the location on your computer where you want to save the downloaded file. If you’re wondering what URI is, know that it is the abbreviation of Uniform Resource Identifier. Technically, you can consider to be the same as URL.

  As mentioned above, when you copy the download link from your browser (or a file) it gets copied to the clipboard and the WCB File Downloader reads that link and pastes it in the Download URL text box. Before pasting, it checks whether the text being copied from Clipboard is a link or some other text i.e. it checks whether the string starts with http or not. The following code performs this task :

string temp;
temp = Clipboard.GetText();
if (temp.StartsWith(“http”))
txtUrl.Text = temp;

  To understand the whole concept of this program, you’ll need to view its source code, which you can download from the link provided below.

WCB File Downloader Download Links

Click here to download the source code of this program (98 KB)

Click here to download the executable of this program (18 KB). This program requires .NET Framework 4.5
  This program is a fully functional file downloader. However, it has a lot of scope for improvement. We’ll develop an improved version of this program soon. Meanwhile, you can tell us what features you’d like to see added to this program.

(Visited 313 times, 1 visits today)

3 comments

Leave a Reply

Your email address will not be published. Required fields are marked *