|
Dim path As String = "", Sourcefile As String = ""
'Dim DevFile As String = "Application\\Data\\data.txt"
If mClass.FileExist(FILE_NAME) = "1" Then
path = "d:\\data.txt"
mClass.DeviceToPc(FILE_NAME, path, True, True)
Sourcefile = "d:"
File.Copy(path, Sourcefile + "\\" + DateTime.Parse(DateTime.Now.ToLongTimeString()).ToString("yyyyMMddhhmmss") + ".txt")
'File.Copy(Path, Sourcefile + "\\" + DateTime.Parse(DateTime.Now.ToLongTimeString()).ToString("yyyyMMddhhmmss") + ".txt")
ReadTxtToSQL()
'MessageBox.Show("上传成功", "Congratulations")
Return
Else
MessageBox.Show("file dose not exist.", "Error")
Return
End If |
|