我用下面的代码对一批文件的后缀进行改名。但就是没用,急呀!
String pathName , newExtention;
try
{
foreach(FileInfo fileInfo in fileInfoList)
{
pathName =fileInfo.FullName;
newExtention = "." + newSuffix.Text;
System.IO.Path.ChangeExtension( pathName ,newExtention);
}
}
catch(IOException ioExpecption){
Console.WriteLine("The process failed: {0}", ioExpecption.ToString());
}
请各位同仁赐教!
谢谢
String pathName , newExtention;
try
{
foreach(FileInfo fileInfo in fileInfoList)
{
pathName =fileInfo.FullName;
newExtention = "." + newSuffix.Text;
System.IO.Path.ChangeExtension( pathName ,newExtention);
}
}
catch(IOException ioExpecption){
Console.WriteLine("The process failed: {0}", ioExpecption.ToString());
}
请各位同仁赐教!
谢谢