The directly solution was to use the below bash command
for /r Source %f in (*) do @copy /Y "%f" Destination
However it will prompt at all conflicts and we don't have an option to say No for all.
So I had to come up with this script instead
@echo off
setlocal enabledelayedexpansion
if "%~1"=="" (
echo Source directory missing
exit /b
)
if "%~2"=="" (
echo Destination directory missing
exit /b
)
set source=%~1
set destination=%~2
for /r "%source%" %%f in (*) do (
set filename=%%~nf
set extension=%%~xf
set count=1
set newname=%%~nf_!count!%%~xf
if not exist "%destination%\!newname!" (
copy "%%f" "%destination%\!newname!"
) else (
:loop
set /a count+=1
set newname=%%~nf_!count!%%~xf
if exist "%destination%\!newname!" goto loop
copy "%%f" "%destination%\!newname!"
)
)
endlocal