步骤一:引用Microsoft.VisualBasic
示例:
string oldPath=Server.MapPath("/HH_UploadFiles/word/2019-12/20/20S1008-1.docx");
string newName="newName.docx";
Computer MyComputer = new Computer();
MyComputer.FileSystem.RenameFile(oldPath, newName);
重命名后文件:/HH_UploadFiles/word/2019-12/newName.docx