如何更改文件的只读属性 [英] How to change Read-Only property for a file

查看:88
本文介绍了如何更改文件的只读属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何使用VB.NET更改文件的只读属性吗?

我有一个只读文件,并且希望能够对其进行写操作.

Does anyone know how to change the read-only attribute for a file using VB.NET?

I have a file that is read-only and I want to be able to write to it.

推荐答案

这可能对您有帮助...
This may helps you...Check it out

regards


这类问题的标准答案是google it!

一个简单的谷歌搜索返回本文作为第一命中:

设置文件属性:隐藏,只读 [
The standard answer for this type of question is, google it!

A simple google search returned this article as the first hit:

Set file attributes: Hidden, ReadOnly[^]

Granted, you would have to know how to change the word true to false, but you should be able to figure that out.

And next time, try to make your title fit your question. The title looked like you wanted to "lock" a file, not change it from read-only.


亲爱的koolprasad20032

谢谢您的帮助,但我一直通过您给我的链接.完成所有步骤后,出现错误,无法解决.

错误说....

文件,文件属性未声明..那么,我需要为文件和文件属性声明什么类型的数据?


那是字符串吗?



再次感谢您的帮助..
Dear koolprasad20032

Thank you ur help but i have been though the link that u gave me. After i done all the step, i got an error and i cant solve it.

the error said ....

File, FileAttributes are not declared.. So what type of data i need to declare for File and FileAttributes?


Is that a String??



Thank you for your help again..


这篇关于如何更改文件的只读属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆