本帖最后由 CrLf 于 2012-1-4 14:58 编辑
查找并导出结果的代码是这样的,但是我不懂得怎么借用- @echo off&setlocal EnableDelayedExpansion&color 1f
- echo ::::%date%,%time% 查找结果::::> 查找结果.txt
- set/p k=请输入关键字:
- for /f "skip=1 tokens=1,2 delims=\" %%i in ('fsutil fsinfo drives^|find /v ""') do (
- set drive=%%i
- set drive=!drive:~-2!
- echo 请稍后,正在查找!drive!盘!
- dir "!drive!\*!k!*" /b/s/d>>查找结果.txt
- cls
- type 查找结果.txt
- )
- start 查找结果.txt
- pause
复制代码
|