1
我想知道我怎麼可以設置文件屬性在vb.net用vb.net來設置文件屬性
,當我打開命令提示符,然後我鍵入此我可以設置ATTRIB
attrib +a +h +s test.txt
究竟如何我做這在vb.net
我想知道我怎麼可以設置文件屬性在vb.net用vb.net來設置文件屬性
,當我打開命令提示符,然後我鍵入此我可以設置ATTRIB
attrib +a +h +s test.txt
究竟如何我做這在vb.net
試試這個:
File.SetAttributes(path, File.GetAttributes("test.txt") Or FileAttributes.Archive)
File.SetAttributes(path, File.GetAttributes("test.txt") Or FileAttributes.Hidden)
File.SetAttributes(path, File.GetAttributes("test.txt") Or FileAttributes.System)
使用http://msdn.microsoft.com/en-us/library/system.io.filesysteminfo.att ributes(v = vs.110).aspx – acfrancis
按F2 ...鍵入「屬性」按鈕 – Plutonix