批量修改文件名
代码
String[] files=System.IO.Directory.GetFiles(@"D:\Projects\OILGAS\OILGAS.Services\Portal\Subject");
foreach(String f in files){
System.IO.FileInfo fi = new System.IO.FileInfo(f);
Console.WriteLine(fi.FullName.Replace("Exhibition","Subject"));
fi.MoveTo(fi.FullName.Replace("Exhibition","Subject"));
foreach(String f in files){
System.IO.FileInfo fi = new System.IO.FileInfo(f);
Console.WriteLine(fi.FullName.Replace("Exhibition","Subject"));
fi.MoveTo(fi.FullName.Replace("Exhibition","Subject"));