Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.
read file line by line
Name: genet Date: February 16, 2007 at 05:25:44 Pacific OS: xp CPU/Ram: intel 3.6 ghz
Comment:
hey again!
thx for the help at my last post! want to ask if there is some way i can read a .txt file line by line ignoring lines beginning with "::" then writing the lines back into a file but without the lines with 2 colons at the beginning. i saw something like this i think using for /f tokens.. thx!
Name: genet Date: February 16, 2007 at 05:44:28 Pacific
Reply:
o sorry i forgot to say i need this in dos batch..
thx
0
Response Number 3
Name: IVO Date: February 16, 2007 at 06:08:13 Pacific
Reply:
FindStr /B /V "::" FileName > FileOut
0
Response Number 4
Name: genet Date: February 16, 2007 at 11:06:54 Pacific
Reply:
thx! works fine.. sorry for the late reply
0
Response Number 5
Name: Mechanix2Go Date: February 17, 2007 at 00:18:27 Pacific
Reply:
Works in NT. For DOS you'll need a 16 bit regex, like grep.
===================================== If at first you don't succeed, you're about average.
M2
0
Response Number 6
Name: genet Date: February 17, 2007 at 01:05:51 Pacific
Reply:
hey again thx!
I am still trying to read a file line by line so i can for axemble read the first line echo it, then the second line ect ect ect until EOF: While doing this i want it to exclude lines that begin with ::
sry i ask so much from you all.. but i really do try my best befor asking.
thx again.
0
Response Number 7
Name: Mechanix2Go Date: February 17, 2007 at 01:12:54 Pacific
Reply:
FindStr /B /V "::" < FileName
===================================== If at first you don't succeed, you're about average.
Summary: Hi I am working on C++.i used the following program to read afile line by line.# #include <stdio.h> # # int main ( void ) # { # static const char filename[] = "file.txt"; # FILE *file = fopen ( ...
Summary: if you have vbscript, open each file and read the lines into arrays. then use a loop to display the 2 arrays, each time printing out the contents side by side. an alternative : If you can download cor...
Summary: Can Somebody help me in this. How to make a c program so that if i give a filename to it as a command line argument, it tells the type of file it is? e.g if i give it a core file, it says that it is a...