c#實現文件重命名的兩種不同方案

最近因爲項目需要,需要實現一個重命名文件的功能。因爲之前一直用powershell,所以第一時間想到的是調用powershell的「ren」命令。 自己寫了一個小demo,見下文。 using System; using System.IO; using System.Management.Automation; using System.Runtime.InteropServices; na
相關文章
相關標籤/搜索