//flex table opened by JP

Click to See Complete Forum and Search --> : DOS batch files: reading from a separate text file?


T-DoG
01-13-2000, 08:58 AM
I hope this is not the wrong place to post. I know my question doesn't really have anything to do with system optimization, but I saw a lot of posts regarding general tech support questions. I apologize if the post is inappropriate.

This is a question about DOS batch files. I want to read from a plain text file. In C++, I can use the input file stream (ifstream) to read from a file. But how do I do it in a DOS batch file? I want to make a loop that will go through the text file one line at a time. Each line will be stored to a variable and proccessed (ex. display to screen). Then it goes on to the next line until the end of the text file is reached.

Thanks in advance.

Axel
01-14-2000, 08:19 AM
I don't think I even own a DOS book anymore and only use dos6.22 to load other OS's on new systems.

There are two places on the web you might check, however - try the microsoft knowledge base and look into the IBM web site in the PC-DOS 7.0 area and see if they have anything on-line about batch files. Far as I know - IBM is the only one still doing any DOS development to support older systems post Y2K.