Hello, Right now i am in the process of "Sorting Files" to get the correct information from the latest file. I am using a different but a good way in my mind to do this process. I seem to always get the retu of 1 from this code but there are over 100 files. The code is VB.NET And it is easy to read after i just explained what its for.
Dim lineread As Integer = 1
Dim pageread As Integer = 1
Private Sub ScanPage_Tick(sender As Object, e As EventArgs) Handles ScanPage.Tick
Dim database As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
If My.Computer.FileSystem.FileExists(database & "DEVFOURM" & "S1P" & pageread & ".txt") = True Then
pageread += 1
Exit Sub
ElseIf My.Computer.FileSystem.FileExists(database & "DEVFORUMS1P1.txt") = False Then
MsgBox("No Files To Scan", MsgBoxStyle.Information)
Else
pageread -= 1
ScanPage.Enabled = False
ScanSUB.Enabled = True
Exit Sub
End If
**End Sub**
I don't really see whats wrong with it. I just need another programmers eyes to maybe catch my problem. Thanks in advance!
I am just trying to get it so that if the file does exist that it will scan to see if there is a file with a bigger number ahead of it. That is why it is coded so that when there is no more files ahead of it it will go back "1" number to the latest file.
