001011 当前离线
六级士官
TOP
CrLf 当前离线
论坛巡查
@echo off&setlocal enabledelayedexpansion set "!~00001.tif=00000001.tif" for /f "delims=" %%a in ('dir /s/b/a-d "E:\王小明\*.tif"') do if defined %%~nxa ren "^%%a" "!%%~nxa!"复制代码
@echo off set "!~00001.tif=00000001.tif" for /f "delims=" %%a in ("^!~00001.tif") do if defined "%%~nxa" call ren "%%a" "%%%%~nxa%%" pause复制代码
把 ~ 去掉试试 CrLf 发表于 2011-8-16 22:59