Board logo

标题: 如何搜索包含特定文件名的文件? [打印本页]

作者: ajon911     时间: 2008-1-6 11:06    标题: 如何搜索包含特定文件名的文件?

比如我要搜索F盘内文件名包含123的txt文件,然后存为a.txt
比如f盘内有 abc.txt, 1234.txt, 2008.txt, 01123.txt, 312325.txt
我要找出1234.txt, 01123.txt, 312325.txt
请各位解答一下!
作者: chishingchan     时间: 2008-1-6 13:26
形式差不多(因我还未精通),差错难免!只作参考:
for %a in ('dir *.txt /b^|find /v "123"') do echo %a>>a.txt

作者: ThinKing     时间: 2008-1-6 17:21

dir /s/b/a-d F:\*123*.txt>a.txt

作者: ajon911     时间: 2008-1-8 11:35


  Quote:
Originally posted by ThinKing at 2008-1-6 05:21 PM:
dir /s/b/a-d F:\*123*.txt>a.txt

太感谢!