Herculeslove 当前离线
列兵
@echo off echo 移动文件中... for /f "delims=" %%i in ('dir /ad /b') do ( pushd "%%i" for /f "delims=" %%j in ('dir /a-d /s /b') do ( if not "%%~dpj"=="%~dp0%%i\" call :movefile "%%j") popd ) echo 移动文件完成! pause&exit :movefile if exist "%~dp0%~nx1" set "n="&goto renfile move %1 "%~dp0">nul 2>nul||(attrib -r -h -s %1& move %1 "%~dp0">nul) goto :eof :renfile set/a n+=1 if exist "%~dp0%~n1(%n%)%~x1" goto renfile move %1 "%~dp0%~n1(%n%)%~x1">nul 2>nul||( attrib -r -h -s %1& move %1 "%~dp0%~n1(%n%)%~x1">nul) goto :eof复制代码
评分人数
HAT 当前离线
荣誉版主
TOP
601997526 当前离线
六级士官
@echo off&setlocal enabledelayedexpansion for /f "delims=" %%i in ('dir /b /s d:\img\*.jpg') do (set i=%%~dpi set i=!i:\jpg=! move "%%i" "!i!" rem 重命名 set i=!i:d:\img\=! ren "d:\img\!i:~0,-1!" "!i:_image\=!" )复制代码