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-13 07:02
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Search for all executable files under the specified disk colon character View 6,345 Replies 41
Original Poster Posted 2006-10-09 21:13 ·  中国 安徽 合肥 电信
新手上路
Credits 12
Posts 4
Joined 2006-07-29 15:36
20-year member
UID 59467
Gender Male
From 安徽合肥
Status Offline
Does anyone have a good method to use batch commands to search for all *.exe files under the specified drive letter, display them, and then use del to delete them all? I'm currently researching a program to deal with logo1_.exe. I sincerely hope everyone can provide ideas! Thanks a lot!~

[ Last edited by funship on 2006-10-9 at 21:16 ]
Floor 2 Posted 2006-10-09 21:22 ·  中国 北京 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
The latest version of KV can kill some variants~:)
At the same time, there are special antivirus programs for this virus on the Star Terminal and Kingsoft Antivirus websites.

At the same time, you can also find some content about netizens researching to delete this virus in the "Search" function of the forum~:)

[ Last edited by redtek on 2006-10-9 at 21:24 ]
Floor 3 Posted 2006-10-10 02:21 ·  中国 广东 东莞 电信
中级用户
★★
Credits 282
Posts 130
Joined 2006-09-20 22:25
19-year member
UID 63201
From 广东
Status Offline
Hehe~~
Is it "Happy Hour"?
I also got infected~
That thing is really annoying~
It seems that batch processing can't kill it~
Change to a dedicated killer~
~~~~好好学习
天天向上~~~~
Floor 4 Posted 2006-10-10 03:54 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Actually, many problems in the forum can be solved using the search function built into Windows. For example, the problem of the original poster. Press Win+F and then search the entire disk for logo_.exe, and then delete all the results.

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 5 Posted 2006-10-10 05:27 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

1. Newcomers can be understood to post multiple times~

2.

@echo off
echo.
echo Declaration:
echo.
Deleting .exe files in the specified drive may cause adverse consequences.
echo.
I shall not be held responsible for such consequences.
echo.
-------------------by:Mis-sqm
echo.
set /p b=Continue? (Y / N):
if %b%==y goto:yes
if %b%==n goto:eof

:yes
cls
set /p a=Please enter the drive letter to search:
echo.
for /f %%i in ('dir /s/b/a-d %a%:\*.exe') do del /f /q %%i
echo.
All *.exe files under the specified drive have been deleted & pause>nul

Floor 6 Posted 2006-10-10 08:02 ·  中国 云南 昆明 电信
初级用户
Credits 32
Posts 14
Joined 2006-10-09 07:50
19-year member
UID 65045
Status Offline
del /s /q /f *.exe

Wow haha... I know this.

Ha!

[ Last edited by ARCF on 2006-10-10 at 08:03 ]
Floor 7 Posted 2006-10-10 11:52 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

The code above is too simple; it can only delete .exe files in the current directory and all subdirectories beneath it.

Try this:


@echo off
for /f "tokens=*" %%i in ('dir/s/b/a-d c:\*.exe d:\*.exe e:\*.exe f:\*.exe') do (
echo %%i
del /s /q /f %%i
)

1. The execution efficiency of the above code is very low.

2. It is possible to delete system files or important files, so make sure you really want to execute this batch script.

3. Please modify the drive letters above by yourself.
Floor 8 Posted 2006-10-10 20:39 ·  中国 北京 东城区 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
Originally posted by funship at 2006-10-9 21:17:
Does everyone have a good way to use batch commands to search for all *.exe files under the specified drive letter, display them, and then use del to delete them all? I'm currently researching this...



Really can't think of what the system is useful for if all executable files are deleted?
Just for this one virus? Haha...

Buy or DL antivirus software, which not only protects existing data but also removes the virus.
Floor 9 Posted 2006-10-13 06:35 ·  中国 重庆 璧山区 电信
中级用户
★★
Credits 235
Posts 109
Joined 2006-08-24 00:52
19-year member
UID 61161
Gender Male
Status Offline
Got it, I've learned something from this.
Floor 10 Posted 2006-10-20 23:33 ·  中国 海南 乐东黎族自治县 电信
新手上路
Credits 10
Posts 5
Joined 2006-10-20 07:31
19-year member
UID 67197
Status Offline
Floor 11 Posted 2006-10-21 00:32 ·  中国 江苏 南京 电信
高级用户
★★
Credits 623
Posts 214
Joined 2006-09-22 20:48
19-year member
UID 63387
Status Offline
for %%1 in (c: d: e: f: g:) do @%%1 & del *.exe /s /a /f /q
But you deleted them all, the system is also done for.
Floor 12 Posted 2006-10-21 00:32 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

  Hehe, I also don't know why he wanted to find all EXE files on the hard drive and delete them... I was confused for a long time...
Floor 13 Posted 2006-10-21 00:34 ·  中国 浙江 温州 电信
中级用户
★★
Credits 458
Posts 196
Joined 2006-10-05 12:04
19-year member
UID 64614
Status Offline
for /r C:\ %a in (logo*.exe) do @echo %a

C:\ can be replaced with any drive:lol:

Just change the command after do:P
Floor 14 Posted 2006-10-21 00:43 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

  The method upstairs is still not advisable.

  If you change echo to del, it may delete files like logonui.exe and logoff.exe in the system folder.
Floor 15 Posted 2006-10-21 00:46 ·  中国 浙江 温州 电信
中级用户
★★
Credits 458
Posts 196
Joined 2006-10-05 12:04
19-year member
UID 64614
Status Offline
Can the wildcards in parentheses be flexible? :P

logo1_.*

*ogo1*.exe so many many

First echo once and then del :D
Forum Jump: