本帖最后由 pcl_test 于 2015-2-14 18:00 编辑
回复 4# sdhaozao - @echo off
- ::设置目标文件夹
- set "fdir=D:\AA\BB\"
- if not exist "%fdir%" md "%fdir%"
- ::指定搜索路径
- cd /d "D:\"
- for /f "delims=" %%a in ('dir /s/b *.pdf') do (
- >>temp.txt echo,%%~nxa。%%~dpa
- )
- for /f "tokens=1,2 delims=。" %%i in ('findstr /b "100-1-1 200-2-1 400-4-1" "temp.txt"') do (
- echo 复制 "%%j%%i" 到 "%fdir%"
- copy /y "%%j%%i" "%fdir%"
- echo.
- )
- del temp.txt /f /q
- pause
复制代码
|