lixiyou 当前离线
列兵
评分人数
pcl_test 当前离线
荣誉版主
@echo off set "fd1=D:\test" set "fd2=E:\test" set/p str=查找字符串: for /r "%fd1%" %%a in ("*%str%*.sql") do ( if not exist "%fd2%\%str%\" md "%fd2%\%str%\" copy "%%a" "%fd2%\%str%\" /y ) pause复制代码
TOP
Nsqs 当前离线
少尉
@echo off&setlocal enabledelayedexpansion&(set /p files=输入查询文件名:)&for /f "delims=" %%1 in ('dir/b/a-d *%files%*.sql')do set n=%%~n1&set p=!n:~18!&(if not exist "!files!\" call md !files!)&move "%%1" "!files!\%%~nx1"复制代码
@echo off&setlocal enabledelayedexpansion&(set /p files=输入查询文件名:)&for /f "delims=" %%1 in ('dir/b/a-d *%files%*.sql')do set n=%%~n1&set p=!n:~18!&(if not exist !p! call md !p!)&move %%1 !p!\%%~nx1复制代码