Originally posted by jun19841 at 2006-5-25 00:57:
attrib +h /s %drive%\*.exe
将该批处理 放至 D盘中只对本盘的 .exe文件做隐藏
要是想将所有盘.exe做隐藏 , 环境变量又改怎么设置?
SET 也可以设置环境堮..
得用for语句对所有的磁盘进行列举,代码如下:
for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
if exist %%a:\recycled\nul attrib +h /s %%a:\*.exe
if exist %%a:\recycler\nul attrib +h /s %%a:\*.exe
)
不敢实测,但是觉得
attrib +h /s %%a:\*.exe 似乎难以对所有的exe文件进行操作.
Last edited by namejm on 2006-5-25 at 13:46 ]