Gosta Munktell (4/10/2013)
You don't tell us how big the file is.
You might not be able to store it in the internal memory and read it reversed?
You do not need to store it as you read through in in reverse, or you could, both options were mentioned above and size of file and available memory would likely dictate the choice.
Anyhow you can read the file per line and write it to another file.
There must be something in the file which tells the date or year of a record.
If the file is sorted you can use a pretty simple and fast method like:
Public Class testa
Public Shared Sub test()
Dim line As String
Dim reader As StreamReader = New StreamReader("C:\temp\input.txt")
Dim writer As StreamWriter = New StreamWriter("C:\temp\output.txt")
line = "start"
' Loop over each line in file, While line is Not Nothing.
Do While (Not line Is Nothing)
line = reader.ReadLine
If Mid(line, 1, 9) <= "something" Then ' Adjust
What do you think using a Flat-File Manager to read the file and then applying the Conditional Split in the Data Flow accomplishes?
__________________________________________________________________________________________________There are no special teachers of virtue, because virtue is taught by the whole community. --Plato