查找多个扩展名文件 [英] Find files of multiple extensions batch

查看:164
本文介绍了查找多个扩展名文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在特定目录下搜索多个文件. 我知道,如果要搜索C:\Test下的所有.exe文件,请执行以下操作:

I'm trying to search for files of multiple under a specific directory. I know that if I wish to search for all .exe files under C:\Test, I do the following:

set FoundFiles=dir /b /s C:\Test\*.exe

但是,我想在C:\Test下搜索所有.exe.txt文件吗?有可能以同样的方式吗? 我尝试了以下方法:

But, what I wish to search for all .exe and .txt files under C:\Test? Is it possible in the same way? I tried the following:

dir /b /s C:\Test\*.exe *.txt

它在cmd中有效,但是当我这样做时:

It works in cmd, however, when I do this:

set FoundFiles=dir /b /s C:\Test\*.exe *.txt

它不起作用.

有可能吗?

推荐答案

这应该有效

dir /b /s *.exe /s *.txt

这篇关于查找多个扩展名文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆