注册 登录
编程论坛 C语言论坛

cmd批处理-关于去除当前文件夹目录下所有文件的隐藏属性

dosdjiwod 发布于 2021-09-06 15:38, 1062 次点击
代码如下;
*********************
@echo off
attrib -h E:\Software data storage\xunlei\扫黑1 /s
pause
*********************
管理员身份运行结果为:Parameter format not correct -

对照了attrib用法,应该没有错啊,请问这是哪里不对呢
1 回复
#2
自由而无用2021-09-06 19:25
https://forums.

abstraction:
Here is the solution to your problem: Surround the filename with double quotes. Otherwise the command prompt will think each embedded space in the filename separates another parameter. Here is how you issue the command in the original post:

attrib -r +s "c:\documents and settings\Myname\favorites"
#3
dosdjiwod2021-09-06 20:06
回复 2楼 自由而无用
Thank you. The problem has been solved
1