不知道你说的全盘是什么意思,F整个分区还是所有分区?- @echo off&setlocal enabledelayedexpansion
- set "fd=F:\查找到图片\"
- md "%fd%" 2>nul
- for /f "delims=" %%a in ('type "查找.txt"') do set "#%%a=%%a"
- for %%a in (c d e f g h i j k l m n) do (
- if exist %%a:\ (
- for /f "delims=" %%a in ('dir /a-d/b/s %%a:\*.jpg') do (
- set "fn=%%~nxa"
- if /i "%%~dpa" neq "%fd%" (
- for /f "tokens=2 delims==" %%c in ('set #') do (
- if "!fn:%%c=!" neq "%%~nxa" (
- if exist "%fd%%%~nxa" (
- rem 处理可能的同名文件
- set /a n+=1
- copy "%%a" "%fd%!n!_%%~nxa"
- ) else copy "%%a" "%fd%"
- )
- )
- )
- )
- )
- )
- pause
复制代码
|