- @echo off&setlocal enabledelayedexpansion
- set "SourDir=F:\Test"
-
- for /f "delims=" %%a in ('dir /a-d/b/s "%SourDir%"') do (
- set/a FileName=%%~na
- if !FileName! geq 100 (
- set "FilePath=%%~dpa"&&set "FilePath=!FilePath:~0,-1!"
- for /f "delims=" %%b in ("!FilePath!") do (
- set "DestPath=%%~dpb"&&set "DestPath=!DestPath:~0,-1!\原图2"
- robocopy /mov "!FilePath!" "!DestPath!" "%%~nxa"
- )
- )
- )
复制代码 回复 3# 40252492 |