Dim mySql_Connection As MySqlConnection
Dim data_i As Integer = 1
mySql_Connection = mysql_net.Mysql_command
While True
mySql_Connection.Open()
'局域网内电脑路径
If My.Computer.FileSystem.FileExists("\\192.168.100.1\UPLOAD\upload.txt") Then
Dim fileReader = My.Computer.FileSystem.ReadAllText("\\192.168.100.1\UPLOAD\upload.txt")
’时间戳
Dim dt As DateTime = New DateTime(1970, 1, 1, 0, 0, 0, 0)
‘读取完放到其他路径
My.Computer.FileSystem.MoveFile("\\192.168.100.1\UPLOAD\upload.txt", "\\192.168.100.1\exchange3\ok\" & "upload_" & (Now().Ticks - dt.Ticks) / 100 & ".txt")
’一个文件可能有多条,以换行符区分
Dim fileallline As String() = fileReader.Split(vbCrLf)