是否有任何函數在.NET中更改文件擴展名? 或者我必須重命名一個文件? 謝謝更改文件擴展名VB.NET
例如我想重命名.resxx擴展名爲.resx的目錄中的每個文件。我的代碼有什麼問題?
昏暗[選項如SearchOption = SearchOption.AllDirectories [選項] = SearchOption.AllDirectories
Dim fileNames As String() = Directory.GetFiles("C:\New Folder", "*.resxx", [option])
For Each f In fileNames
Dim t As New FileInfo(f.ToString)
MsgBox(Mid(f, 1, f.Length - 4))
t.MoveTo(Mid(f, 1, f.Length - 4) + ".resx")
Next
感謝........................ – 2012-05-29 10:06:16