繁体   English   中英

清除Windows中的存档位

[英]clear the archive bit in windows

我试图清除Windows 7 64bit中某些文件中的存档位。 我已经尝试了代码:

atrrib -a * /s

我收到的错误:“ atrrib”未被识别为内部或外部命令,可操作程序或批处理文件。

我正在浏览文件中的一小段Java代码。 如果有一种方法可以在Java中进行,则更可取。

在Java7中,您可以执行以下操作:

File theFile = new File("c:/foobar.txt");
Path file = theFile.toPath();
Files.setAttribute(file, "dos:archive", false);

r太多,请尝试以下操作:

attrib -a * /s

使用完整路径运行。 C:>%SystemRoot%\\ system32 \\ attrib

环境变量路径和attrib的使用存在问题。

有关更多详细信息,请参见此链接。 http://social.technet.microsoft.com/Forums/windows/zh-CN/63b84992-3814-4c00-acbf-fc09816570e5/problem-in-path-settings-windows7?forum=w7itprogeneral

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM