Click here to Skip to main content
12,998,759 members (70,765 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi, Its and external server. The application is like an application updater that will check for new updates in a txt file. So I have a text file uploaded like this. The files that I want to be downloaded is named in that patch.txt file. The files named in there will be uploaded in the same directory as the patch.txt file so the updater can download them. So If I want to add a new update then I should only need to upload the new file and then edit the patch.txt and add the name of the file in there. I hope you understand what I mean. So my question is: How can I make it read a text file from an external server and loop through them and then download the files?

Any help would be appreciated.
Posted 30-Oct-12 12:04pm
Updated 30-Oct-12 23:50pm
AspDotNetDev 30-Oct-12 18:32pm
What problem are you having with your code? Is the file local to the server the webpage is running from, or is it on an external server? Do you actually want to read each line consecutively, or do you want to just dump the contents of the entire file into a textbox?
Sergey Alexandrovich Kryukov 30-Oct-12 18:44pm
Not a question. If you say "I want", you can do it.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

string curFileMenu = @"C:\Accounting\Accounting\Accounting\TextFileMenu.txt";
            if (File.Exists(curFileMenu))
                string[] menunames = System.IO.File.ReadAllLines(curFileMenu);
                foreach (string menuname in menunames)
                    lnLenght = menuname.Length;
                    lnLenghtLast = menuname.IndexOf("::") + "::".Length;
                    lnLenghtFirst = menuname.LastIndexOf("::");

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 31 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100