At >10GB it can't be an mdb file, so I'll guess it's a text file. If the
records are variable length, the only way to find out the length of each
record is to read the entire file. This is easily done with heavy-duty
text file tools such as Perl and should be possible with other scripting
languages such as VBScript. I wouldn't try it in VBA unless desperate.
If you have or can install Perl on your computer, a command like this at
a Windows prompt will output the line number, length and contents of all
lines longer than 2500 characters:
perl -ne"$L = length; print qq($.\t$L\t$_) if $L > 2500" filename.txt
Omit the \t$_ if you just want the line number and length.
Here's a VBScript that should do the same job, though I don't know
whether it will cope with humungous files:
'Start of VBScript
Option Explicit
Dim fso 'FileSystemObject
Dim fIn 'Textstreams
Dim strL 'String
Dim LineNumber
Dim LineLength
If WScript.Arguments.Count = 1 Then
Set fso = CreateObject("Scripting.FileSystemObject")
Set fIn = fso.OpenTextFile(WScript.Arguments(0))
Do 'Read line by line
strL = fIn.ReadLine
LineLength = Len(strL)
LineNumber = LineNumber + 1
If LineLength > 1 Then
WScript.StdOut.WriteLine LineNumber & vbTab & LineLength & vbTab
& strL
End If
Loop Until fIn.AtEndOfStream
'Tidy up
fIn.Close
WScript.StdOut.Close
Else
MsgBox "Syntax: CScript.exe " & WScript.ScriptName _
& " InputFile.txt > OutputFile.txt", _
vbOKOnly & vbExclamation, WScript.ScriptName
End If
'End of VBScript