windows attrib -s -r -h /s /d 不被识别为内部或外部命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19652411/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
attrib -s -r -h /s /d is not recognized as internal or external command
提问by kimiberi
I just wanna ask about this problem.
我就是想问这个问题。
I want to retrieve my files on my flash drive and then I tried this one:
我想在我的闪存驱动器上检索我的文件,然后我尝试了这个:
-s -r -h /s /d
but the result is:
但结果是:
'-s' is not recognized as an internal or external command,
operable program or batch file.
How can I solve this one ?
我该如何解决这个问题?
回答by Gagan Sopori
Try changing the environment variables :-
尝试更改环境变量:-
- Right click My Computer> Properties> Advanced System Settings.
- In the Advanced System Settings Tab, click on Environment variablesand look for Pathin System variables
- Click Editand add C:\Windows\System32;at the end of the string.MAKE SURE YOU DON'T DELETE THE REST OF THE STRING.
- 右键单击“我的电脑”>“属性”>“高级系统设置”。
- 在高级系统设置选项卡中,单击环境变量并在系统变量中查找 路径
- 单击编辑并添加C:\Windows\System32;在字符串的末尾。确保您没有删除字符串的其余部分。
回答by Andrew Marais
For a once off attrib call you can use:
对于一次性 attrib 调用,您可以使用:
C:\Windows\System32\attrib.exe
Or you can change directory first and add the path in the parameters:
或者您可以先更改目录并在参数中添加路径:
cd C:\Windows\System32\
then
然后
attrib.exe -s -r -h "d:\file1.txt" /s /d