以下是我正在使用的代码。希望它有助于确定我需要帮助的区域。
Private Sub readCVS_file()
Using MyReader As New Microsoft.VisualBasic.
FileIO.TextFieldParser(
GetTempPath() + "output.tmp")
MyReader.TextFieldType = FileIO.FieldType.Delimited
MyReader.SetDelimiters(",")
Dim currentRow As String()
While Not MyReader.EndOfData
Try
currentRow = MyReader.ReadFields()
Dim currentField As String
For Each currentField In currentRow
'get file path using currentField. First field is program name
Next
Catch ex As Microsoft.VisualBasic.
FileIO.MalformedLineException
MsgBox("Line " & ex.Message &
"is not valid.")
End Try
End While
End Using
End Sub
在读取当前字段后,我想获取文件名的路径(filename是output.tmp文本文件中的第一个字段。)
感谢您的帮助......