Arsenik77, Как-то так
Код:
![Выделить весь код](images/misc/selectcode.png)
@echo off
setlocal
for /d %%i in ("generalfolder\*") do (
pushd "%%i"
for /d %%j in (*) do (
for /f "tokens=*" %%k in (' "2>nul dir /b /s /a-d "%%j"" ') do call:move "%%k"
)
popd
)
goto:eof
:move
set "file=%~nx1"
:check
set /a cnt+=1
if exist "%file%" set "file=%~n1(%cnt%)%~x1" && goto:check
move %1 "%file%"
set "cnt="
set "file="