Then I'll make a bomb and challenge plp626... If I can get it done at once... You must teach me the method!
Surfing the Internet in an Internet cafe, can't make anything complicated... Failed... But I took out the previous autorun multiple immunity... Let's try
::Should... It won't cause bad results. Suitable for NTFS formatted disks
@echo off
set /p n=Enter the number of non-deletable files to create here, no judgment. Best is 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)
::If there is still autorun.inf at this time, it should be a folder that cannot be deleted
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 Do you want to cancel?
set /p in=(y/n)
if /i %in%==y goto delete
if /i %in%==n (exit) else (goto 2)
:delete
set /p m=Enter the number here, no judgment. Best is 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 It may have been established, or other problems occurred, press any key to go to the delete item.
pause>nul
goto :2
[ Last edited by 523066680 on 2008-3-9 at 11:09 AM ]
Surfing the Internet in an Internet cafe, can't make anything complicated... Failed... But I took out the previous autorun multiple immunity... Let's try
::Should... It won't cause bad results. Suitable for NTFS formatted disks
@echo off
set /p n=Enter the number of non-deletable files to create here, no judgment. Best is 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)
::If there is still autorun.inf at this time, it should be a folder that cannot be deleted
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 Do you want to cancel?
set /p in=(y/n)
if /i %in%==y goto delete
if /i %in%==n (exit) else (goto 2)
:delete
set /p m=Enter the number here, no judgment. Best is 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 It may have been established, or other problems occurred, press any key to go to the delete item.
pause>nul
goto :2
[ Last edited by 523066680 on 2008-3-9 at 11:09 AM ]

