本帖最后由 terse 于 2019-12-12 17:39 编辑
- @echo off&setlocal enabledelayedexpansion
- if "%~1" == "" (set d=%~dp0) else set "d=%~1\"
- Set Path=D:\RenameTool\Rename.csv
- for /f "delims=" %%a in (%Path%) do (
- for /f "tokens=1-2 delims=," %%a in ("%%a") do (
- for /f "tokens=*" %%d in ('dir /b/s/ad "%d%"') do (
- if exist "%%d\%%~a" (
- ren "%%d\%%~a" "%%d\%%~b"
- echo %%d\%%~nxa 重命名为..... %%d\%%~nxb
- )
- )
- )
- )
复制代码
|