更改只读文件属性为正常
2006-08-18 13:49
471 查看
//设置Test.txt为只读
private void button1_Click(object sender, System.EventArgs e)
//设置Test.txt为正常
private void button2_Click(object sender, System.EventArgs e)
System.IO.FileInfo file1=new System.IO.FileInfo("Test.txt");
file1.Attributes=System.IO.FileAttributes.Normal;
}
private void button1_Click(object sender, System.EventArgs e)
//设置Test.txt为正常
private void button2_Click(object sender, System.EventArgs e)
System.IO.FileInfo file1=new System.IO.FileInfo("Test.txt");
file1.Attributes=System.IO.FileAttributes.Normal;
}
相关文章推荐
- C# 更改文件只读属性 - [C#]
- 复制、删除、移动文件、获取文件的版本信息、更改文件属性,删除只读文件
- java设置文件属性(隐藏,只读...)
- 文件删除不了,文件粉碎也不行,去不掉只读属性,F8安全模式下也删不掉,参数不正确
- 在ASP.NET去掉文件的只读属性
- Linux 无法修改/etc/fstab内容 (去除fstab文件只读属性)
- svn命令行给文件加只读属性
- VB-改变文件只读属性
- vba 设置txt文件只读,隐藏属性
- asp在本地正常,在服务器上报无法识别的属性“targetFramework”,我改了版本显示文件不存在404,从微软官网下载.net包就正常了
- 在VC++下对文件属性的获取与更改
- [无异常,才正常] 加载属性文件内容报:Cannot load JDBC driver class ${jdbc.driverClassName}'
- PowerShell设置文件只读、隐藏属性的方法
- 命令行更改文件属性
- C# 去除文件和文件夹的只读属性
- linux文件只读属性
- VC ++实现 对文件的 隐藏, 只读 ,创建时间 , 最后修改时间 ,最后访问时间 属性的修改
- 更改xml文件中imageview的src属性方法
- 在VC++下对文件属性的获取与更改