需要一个bat文件来超级隐藏flash中的文件夹?

时间:2022-08-22 16:02:45

I know I can super hide a folder by using the following codes in cmd: attrib +S +H FolderName But I need a .bat file to do this for me automatically when my flash is connedted to computer.

我知道我可以通过在cmd中使用以下代码来超级隐藏文件夹:attrib + S + H FolderName但是当我的闪存连接到计算机时,我需要一个.bat文件来自动执行此操作。

1 个解决方案

#1


0  

If you know the flash drive letter (or range of probable letters) you can use

如果您知道可以使用的闪存驱动器号(或可能的字母范围)

:LOOP
for %%a in (E: F: G:) do (
if exist %%a\FolderToHide attrib +s +h %%a\FolderToHide
)
timeout /t 5
goto :LOOP

The timeout is just so the batch doesn't overload the CPU cycles, and if your not sure about the drive letter just do A: to Z:.

超时只是因为批处理不会使CPU周期过载,如果您不确定驱动器号,只需执行A:到Z:。

#1


0  

If you know the flash drive letter (or range of probable letters) you can use

如果您知道可以使用的闪存驱动器号(或可能的字母范围)

:LOOP
for %%a in (E: F: G:) do (
if exist %%a\FolderToHide attrib +s +h %%a\FolderToHide
)
timeout /t 5
goto :LOOP

The timeout is just so the batch doesn't overload the CPU cycles, and if your not sure about the drive letter just do A: to Z:.

超时只是因为批处理不会使CPU周期过载,如果您不确定驱动器号,只需执行A:到Z:。