找到问题了。
文本里面有个roof形成干扰。- @echo off
- for /f "tokens=* delims=" %%a in (文件夹名称1.txt) do (
- set VAR=%%a
- setlocal ENABLEDELAYEDEXPANSION
- for /f "delims=" %%k in ('dir /s/b/a-d E:\JP-XIN\*.pdf E:\JP-XIN\*.txt ^| findstr /i /c:"!VAR!" 2^>nul') do (
- for /f "tokens=*" %%l in ('dir /s/b/a:d-h E:\ ^| findstr /e /c:"!VAR!" 2^>nul') do (
- if not "%%l"=="" move "%%k" "%%l\" >nul 2>nul
- )))
- pause
复制代码
|