那我做个炸药 挑战一下 plp626哈……如果可以一次性搞定……你一定要教我方法!
在网吧上网,做不出什么复杂的东西了……失败……不过我拿出以前的autorun多重免疫……试试看
::应该。。。。。不会造成不良结果。适于ntfs格式的磁盘
@echo off
set /p n=在这里输入建立不可删文件个数,不判断。最好是1^<n^<50___:
for %%a in (a b 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: (
%%a: &cd\
for /f "tokens=*" %%b in ('dir /a-d /b autorun.inf') do (del /a /f /q %%b)
::如果这时候还存在autorun.inf 那应该就是删不掉的文件夹了
if exist autorun.inf goto :fail
md autorun.inf &cd autorun.inf
for /l %%d in (1,1,%n%) do (md %%d%%d &md %%d%%d\con\)
cd..
attrib autorun.inf +a +s +h +r
echo y |cacls autorun.inf /p everyone:n
))
:2
cls
echo 是否取消?
set /p in=(y/n)
if /i %in%==y goto delete
if /i %in%==n (exit) else (goto 2)
:delete
set /p m=在这里输入数字,不判断。最好是1^<n^<50___:
for %%c in (a b 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 %%c:\autorun.inf (
%%c: &cd\
echo y |cacls autorun.inf /p everyone:f
cd autorun.inf
for /l %%e in (1,1,%m%) do (rd %%e%%e\con\)
cd..
rd autorun.inf /s /q
))
exit
:fail
echo 可能已经建立了,或者遇见其他问题,按任意键到删除项。
pause>nul
goto :2
[ Last edited by 523066680 on 2008-3-9 at 11:09 AM ]
在网吧上网,做不出什么复杂的东西了……失败……不过我拿出以前的autorun多重免疫……试试看
::应该。。。。。不会造成不良结果。适于ntfs格式的磁盘
@echo off
set /p n=在这里输入建立不可删文件个数,不判断。最好是1^<n^<50___:
for %%a in (a b 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: (
%%a: &cd\
for /f "tokens=*" %%b in ('dir /a-d /b autorun.inf') do (del /a /f /q %%b)
::如果这时候还存在autorun.inf 那应该就是删不掉的文件夹了
if exist autorun.inf goto :fail
md autorun.inf &cd autorun.inf
for /l %%d in (1,1,%n%) do (md %%d%%d &md %%d%%d\con\)
cd..
attrib autorun.inf +a +s +h +r
echo y |cacls autorun.inf /p everyone:n
))
:2
cls
echo 是否取消?
set /p in=(y/n)
if /i %in%==y goto delete
if /i %in%==n (exit) else (goto 2)
:delete
set /p m=在这里输入数字,不判断。最好是1^<n^<50___:
for %%c in (a b 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 %%c:\autorun.inf (
%%c: &cd\
echo y |cacls autorun.inf /p everyone:f
cd autorun.inf
for /l %%e in (1,1,%m%) do (rd %%e%%e\con\)
cd..
rd autorun.inf /s /q
))
exit
:fail
echo 可能已经建立了,或者遇见其他问题,按任意键到删除项。
pause>nul
goto :2
[ Last edited by 523066680 on 2008-3-9 at 11:09 AM ]

