By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 765 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

ASCII file without crlf's

P: n/a
Hello. I am working with very large files in my .NET project (1
million plus records). Some of these files do not have crlf's, which
makes it very hard to read the file without a layout or record length.
In my application, I would like to open one of these text files and
check to see if it contains crlf's before proceeding in my code. I
tried using the streamreader, but readline() cancels out with a memory
error because it thinks the ENTIRE file is the first record since there
are no crlf's. I have also tried FSO, but I get a server timeout.

Is there any easy way to check for crlf's with large files like these?

Thanks!
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

I think that whatever you will do will need to go through the file (to
find crlf). what i suggest is to use pre task to check files (like
monitoring directory for new files and check them ).

HTH
Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2

P: n/a
Andrew,

Did you try using StreamReader.Read to read
character by character? I think you can use it with some tricks
and then get your work done.

--
Hope this helps,
Zeeshan Mustafa, MCSD
"Andrew" <ne*************@yahoo.com> wrote in message
news:7d**************************@posting.google.c om...
Hello. I am working with very large files in my .NET project (1
million plus records). Some of these files do not have crlf's, which
makes it very hard to read the file without a layout or record length.
In my application, I would like to open one of these text files and
check to see if it contains crlf's before proceeding in my code. I
tried using the streamreader, but readline() cancels out with a memory
error because it thinks the ENTIRE file is the first record since there
are no crlf's. I have also tried FSO, but I get a server timeout.

Is there any easy way to check for crlf's with large files like these?

Thanks!


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.