0

I'm looking to create a batch script for folders starting with the word GFI (followed by an individual name each time) to be recursively set to hidden on a regular basis (I imagine I would have to run the script through windows task scheduler to achieve the second part.) Any help would be of great assistance as I have no idea where to start in the slightest!

Thanks in advance, Kieren Perry

4

2 回答 2

0

此代码隐藏所有 GFI 文件夹,无论搜索模式如何:

for /r /d "\" %%i in (GFI*) do attrib +h "%%~fi"
于 2013-04-28T03:05:01.973 回答
0

隐藏文件夹.bat

@Echo OFF

For /D /R "C:\Folder\" %%# in ("GFI*%~1") DO (ATTRIB +H "%%#")

Pause&Exit

用法:

HideFolders.bat "IndividualName"

例如,如果您启动:

HideFolders.bat "Test"

...按此模式搜索文件夹:

GFI*Test
于 2013-04-27T16:42:42.210 回答