类型:转载 责任编辑:asp 日期:2007/03/01
在c#中如何修改一个文件的文件名(包括后缀名)
如何修改一个文件的属性,使它不能被删除
推荐阅读
string myfile = @"c:\1.txt";
//移动也就是改名
system.io.file.move(myfile,@"c:\2.txt");
//设置只读
system.io.file.setattributes(myfile,fileattributes.readonly);