在命令提示符窗口中查找多个文件扩展名


13

我想使用多个参数来查找我的windows / SYSTEM32 3名不同的扩展在一个命令:.exe.dll.sys

这给了我想要的东西,但是我不知道如何在单个命令中获得所有3个扩展:

dir c:\windows\system32\*.dll /p

Answers:



3

如果要列出具有三个扩展名之一的文件,则应从以下内容开始:

dir *.exe *.dll *.sys

我必须在一个命令提示符下找到所有具有这3个扩展名的文件,并且在屏幕之间/ p之间有一个停顿

FWIW,“ dir c:\ windows \ system32 \ *。dll c:\ windows \ system32 \ *。exe c:\ windows \ system32 \ *。sys / p”在Windows 7上有效
Arnold Spence

dir *.exe *.dll *.sys /s /p 将搜索所有子目录,并且每个屏幕之间都有一个停顿
Enigman

阅读unix.stackexchange.com/a/157299/8763之后,我好奇是否可以在Windows批处理文件上执行相同的操作。
sergiol '16

1

将其制作为批处理文件(.bat),然后在命令提示符下运行它

@echo off

dir c:\windows\system32\*.dll
pause
dir c:\windows\system32\*.exe
pause
dir c:\windows\system32\*.sys

我赞成,但是不确定批处理文件是否满足他的要求。我的答案肯定会奏效
Keltari 2013年

0

另一种选择是ç焊割d irectory &&然后做查询

cd c:\windows\system32 && dir *.exe *.dll *.sys

节省了一些输入...

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.