是否只需对父文件夹执行这些步骤即可隐藏文件夹内的所有文件。因为我认为这一步,我需要对父文件夹中的每个文件重复这些步骤。因此,如果我有 50 个文件想要隐藏在父文件夹中。我必须对父文件夹内的所有文件执行 50 次相同的步骤。
答案1
查看帮助:
C:\WINDOWS\system32>attrib /?
Displays or changes file attributes.
ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [+I | -I]
[drive:][path][filename] [/S [/D] [/L]]
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
I Not content indexed file attribute.
X No scrub file attribute.
V Integrity attribute.
[drive:][path][filename]
Specifies a file or files for attrib to process.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.
/L Work on the attributes of the Symbolic Link versus
the target of the Symbolic Link
显然通配符可以完成这个任务,比如“ATTRIB +H +SC:\DIR\*.*”,你也可以使用 /S 将其应用于整个树