Dim diar1 As IO.FileInfo() = ContractDirectory.GetFiles()
Dim dra As IO.FileInfo
Dim CC As Integer
Dim c As Integer
For Each dra In diar1
Dim FILE_NAME As String = "C:\Users\Owner\Documents\"[Dra]
Next
所以diar 1收集目录中的所有文件名,现在我想通过循环访问目录中的每个文件来处理每个文件。
所以[Dra]将是text.txt。
答案 0 :(得分:0)
您需要dra作为文件的名称+扩展名。 dra.Name
会这样做:
For Each dra In diar1
Dim FILE_NAME As String = "C:\Users\Owner\Documents\" & dra.Name
Next