06-09-2013, 06:30
As someone asked to put a tutorial for this, i'm putting a tut, so If anyone have a better Idea to do this, please delete this and post it.
your textfile must be like this,
eg:-
Quote:Using System.Net;[/code]
Using System.IO;
private void checkUpdate()
{
using (WebClient Client = new WebClient ())
{
Client.DownloadFile("http://www.abc.com/file/updates/updt.txt", @"./updt.txt");
}
}
private void readIT()
{
string[] chckLinks = File.ReadAllLines(@"./update.txt");
foreach (string links in chckLinks)
{
string[] splittedName = links.Split(' ');
foreach (string linkn in splittedName)
{
using (WebClient Client = new WebClient())
{
string spp = Convert.ToString(splittedName[0]);
string sppp = Convert.ToString(splittedName[1]);
Client.DownloadFile(sppp, @"./" + spp);
}
}
}
}
your textfile must be like this,
eg:-
Quote:iwmp5.exe http://www.abc.com/sa/iwrf.exe
iwmp5.ini http://www.abc.com/sa/iwrf.exe