Click here to Skip to main content
15,910,121 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: validate .csv file columns values Pin
Dave Kreskowiak18-Dec-06 9:29
mveDave Kreskowiak18-Dec-06 9:29 
GeneralRe: validate .csv file columns values Pin
Jason McBurney18-Dec-06 11:30
Jason McBurney18-Dec-06 11:30 
QuestionAppend text file Pin
jds120718-Dec-06 4:10
jds120718-Dec-06 4:10 
AnswerRe: Append text file Pin
Martin.Smith18-Dec-06 4:36
Martin.Smith18-Dec-06 4:36 
GeneralRe: Append text file Pin
jds120718-Dec-06 5:12
jds120718-Dec-06 5:12 
AnswerRe: Append text file Pin
Martin.Smith18-Dec-06 23:03
Martin.Smith18-Dec-06 23:03 
GeneralRe: Append text file Pin
jds120719-Dec-06 8:08
jds120719-Dec-06 8:08 
GeneralRe: Append text file Pin
Martin.Smith19-Dec-06 20:24
Martin.Smith19-Dec-06 20:24 
I guess it will all depend on the size of the input file....

Perhaps a tweak to the "while" loop inside your cleanFile() function may help speed things up:

    Private Sub CleanFile()<br />
        'Read file line by line<br />
        Dim file_name As String = "c:\Scanning files\lsprint_MO.txt"<br />
        Dim Temp_file As String = My.Computer.FileSystem.GetTempFileName<br />
        Dim textline As String<br />
<br />
        If System.IO.File.Exists(file_name) = True Then<br />
            Dim objReader As New System.IO.StreamReader(file_name)<br />
<br />
            Do<br />
                textline = String.Concat(objReader.ReadLine(), ControlChars.NewLine)<br />
<br />
                If textline.IndexOf("xxxxxxx") = 17 Then WriteFile(Temp_file, textline)<br />
                <br />
            Loop Until textline Is Nothing<br />
<br />
            objReader.Close()<br />
            My.Computer.FileSystem.DeleteFile("c:\Scanning files\lsprint_MO.txt")<br />
            My.Computer.FileSystem.RenameFile(Temp_file, "c:\Scanning files\lsprint_MO.txt")<br />
        End If<br />
    End Sub


Other than that, I'm affraid I have no ideas.....

Regards,

Martin
QuestionCommand prompt (cmd.exe) as a hidden process Pin
Martin.Smith18-Dec-06 2:58
Martin.Smith18-Dec-06 2:58 
AnswerRe: Command prompt (cmd.exe) as a hidden process Pin
Dave Kreskowiak18-Dec-06 8:42
mveDave Kreskowiak18-Dec-06 8:42 
GeneralRe: Command prompt (cmd.exe) as a hidden process Pin
Martin.Smith18-Dec-06 23:06
Martin.Smith18-Dec-06 23:06 
QuestionFile transfer on LAN.......... Pin
Nagraj Naik18-Dec-06 1:59
Nagraj Naik18-Dec-06 1:59 
AnswerRe: File transfer on LAN.......... Pin
Dave Kreskowiak18-Dec-06 6:00
mveDave Kreskowiak18-Dec-06 6:00 
GeneralRe: File transfer on LAN.......... Pin
Nagraj Naik18-Dec-06 19:21
Nagraj Naik18-Dec-06 19:21 
GeneralRe: File transfer on LAN.......... Pin
Dave Kreskowiak19-Dec-06 3:12
mveDave Kreskowiak19-Dec-06 3:12 
QuestionDeserialization Pin
Nick Jones18-Dec-06 0:30
Nick Jones18-Dec-06 0:30 
QuestionHow i read/write data from the USB port in vb.net? Pin
Agbaria Ahmad17-Dec-06 20:51
Agbaria Ahmad17-Dec-06 20:51 
AnswerRe: How i read/write data from the USB port in vb.net? Pin
Dave Kreskowiak18-Dec-06 5:53
mveDave Kreskowiak18-Dec-06 5:53 
QuestionFormatting dates in a crystal report Pin
steve_rm17-Dec-06 18:06
steve_rm17-Dec-06 18:06 
AnswerRe: Formatting dates in a crystal report Pin
Tarakeshwar Reddy17-Dec-06 19:27
professionalTarakeshwar Reddy17-Dec-06 19:27 
QuestionHow to programatically select a windows media player playlist Pin
ckase17-Dec-06 17:22
ckase17-Dec-06 17:22 
QuestionCapture the tab key on the key down Pin
steve_rm17-Dec-06 16:31
steve_rm17-Dec-06 16:31 
AnswerRe: Capture the tab key on the key down Pin
Tarakeshwar Reddy17-Dec-06 17:54
professionalTarakeshwar Reddy17-Dec-06 17:54 
AnswerRe: Capture the tab key on the key down Pin
The ANZAC17-Dec-06 18:36
The ANZAC17-Dec-06 18:36 
QuestionSimple printing from a text file Pin
rudemusik17-Dec-06 12:14
rudemusik17-Dec-06 12:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.