super1129 当前离线
上等兵
评分人数
冷玉公子 当前离线
三级士官
Dir /S *专业*COPY
Dir /S *专业* >> File.txt COPY
For /R %A In (专业) Do @Echo %ACOPY
For /R %A In (专业) Do @Echo %A >> File.txt COPY
TOP
首先你所需要的不需要批处理,命令就可以解决 方法1:Dir /S 搜索命令 如果要输出要一个文件加上重定向符号 ... 冷玉公子 发表于 2011-11-17 19:31
CrLf 当前离线
论坛巡查
findstr /lms 专业 *.txtCOPY
Hello123World 当前离线
荣誉版主
@echo off(for /f "delims=" %%i in ('Dir /s /b /a-d d:\abc\*.txt') do Findstr /m "专业" "%%i")>包含专业.txtstart 包含专业.txtpauseCOPY
279491611 当前离线
二级士官
flyinnet9 当前离线
少尉
@echo offmd 专业for /f "delims=" %%a in ('dir /s /b /a-d ^|findstr "专业"') do move /y "%%a" .\专业\COPY
@echo offmd 专业for /f "delims=" %%a in ('dir /s /b /a-d') do for /f "delims=" %%b in ('echo "%%~na" ^|findstr "专业"') do move /y "%%a" .\专业\COPY
@echo offmd 专业 2>nulfor /f "delims=" %%a in ('dir /s /b /a-d') do echo %%~na |findstr "专业" >nul && move /y "%%a" .\专业\COPY
pcl_test 当前离线
dir /s /b /a-d|findstr /e "\\[^\\]*专业[^\\]*"COPY
zhangfei441441 当前离线
列兵