首页 新闻 会员 周边

用C#怎么达到类似批处理命令: attrib.exe +s +h a_strPath的隐藏效果

0
悬赏园豆:5 [已关闭问题] 关闭于 2013-04-04 13:12

想知道用C#怎么达到类似批处理命令

attrib.exe  +s +h  "D:\TEST\201210231158590799.txt" 的隐藏效果。

 

 

百度的C#代码都是

  File.SetAttributes(path,MyAttributes2 | FileAttributes.System); 

  File.SetAttributes(path,MyAttributes2 | FileAttributes.Hidden);

只能隐藏,但如果我设置系统隐藏的文件夹可见的话我就可以看到灰色的文件,与bat效果不同!

问题补充:

为什么没有人回答啊?是问题看不懂?

maanshancss的主页 maanshancss | 菜鸟二级 | 园豆:303
提问于:2012-10-23 15:09
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册