@echo off
set A=A
set B=A
REM 注:以上两行是设置AB文件
for /f "tokens=*" %%i in ('dir %A%\*.mp3 /b') do (
if exist "%B%\%%i" (
move "%A%\%%i" "%B%\%%~ni_5.mp3" >nul
echo "%A%\%%i"→ "%B%\%%~ni_5.mp3"
) else (
move "%A%\%%i" "%B%\" >nul
echo "%A%\%%i"→ "%B%\"
)
)
pause
for /f "delims=" %%a in ('dir /a-d /b /s A\*.mp3') do (
if exist "B\%%~nxa" (
move "%%~a" "B\%%~na_5%%~xa"
) else (
move "%%~a" "B\%%~nxa"
)
)
pause