【发布时间】:2015-10-17 05:33:51
【问题描述】:
我编写了一个数据排序器,它会为它正在写入的文件写出一个 .build 扩展名,因此当它正在将数据写入特定文件时,没有任何东西会尝试提升它。
最后,我想在程序关闭之前将任何带有 .build 扩展名的内容重命名为 .dat。
For Each f In outputFiles
For Each r In TrailerRecords
' Set the bill count variable
If r.VariableField Then
r.Fields(1) = String.Format("{0:000000}", f.Value)
End If
' Write the trailer record to the output file
File.AppendAllText(f.Key, r.ToString() & vbLf)
Next
' Rename all.build files to .dat
NEEDS TO GO HERE
' Copy each output file to the backup directory
File.Copy(f.Key, Path.Combine(backupFolder, Path.GetFileName(f.Key)), True)
Next
End Sub
【问题讨论】:
-
你读过stackoverflow.com/questions/10784613/… 吗?看起来它会解决你的问题。
标签: vb.net