0

Hi i am having a problem regarding this matching numbers from my local file to remote or website file. here is the File that i want to match

LocalFile.Txt // Contains 101 Match to the Website File patch.Txt

1 File1.rar 2 File2.rar . . . 101 file101.rar 102 file102.rar 103 file103.rar

What i want to happened is to match the Number from my LocalFile.txt to patch.txt from my website and download the numbers below the matched numbers...

I have the simple code reading text file from remote

            WebClient web = new WebClient();
        System.IO.Stream stream = web.OpenRead("http: // mysite .com /update_regular/patchlist.txt");
        using (System.IO.StreamReader reader = new System.IO.StreamReader(stream))
        {
            String text = reader.ReadToEnd();
            MessageBox.Show(text); // Just to show the result for now
        }

and Downloading File from my Website

         WebClient webClient = new WebClient();
        webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
        webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
        webClient.DownloadFileAsync(new Uri("http: // mysite . com/update_regular/754500106.rar"), @"H:\test\754500106.rar");
    }
    private void ProgressChanged(object sender, DownloadProgressChangedEventArgs e)
    {
        progressBar1.Value = e.ProgressPercentage;
    }

    private void Completed(object sender, AsyncCompletedEventArgs e)
    {
        MessageBox.Show("Download completed!");
    }

How can i complete the task to a fully operational matching and downloading.. Thanks in advance for the help..

  • 1
    We do not complete your assignment, we can help you with specific problems. For extracting numbers check out the Regex class. For matching numbers check out Dictionary or HashSet for reading RAR-files check out http://stackoverflow.com/questions/1025863/read-content-of-rar-files-using-c-sharp - Hope this will help you on your quest. – Casperah Dec 30 '13 at 21:12
  • yeps i just need an idea how to do it. i just explained it a little detailed explanation hehehe thanks Casperah – user2879926 Dec 31 '13 at 06:00

0 Answers0