Then I found a solution, and I think its very easy and fast then any other method.
@ECHO OFF
SET "source=C:\Users\source"
SET "dest=C:\Users\destination"
SET "FileList=*.txt"
SET "dupCnt=1"
FOR /R "%source%" %%A IN (%FileList%) DO (
IF NOT EXIST "%dest%\%%~NXA" (
XCOPY /F /Y "%%~FA" "%dest%\" && IF EXIST "%%~FA" /Q /F "%%~FA"
) ELSE (
CALL :DupeRoutine "%%~FA" "%%~NA" "%%~XA"
)
)
GOTO :EOF
:DupeRoutine
IF EXIST "%dest%\%~2_(%dupCnt%)%~3" (
SET /A dupCnt=%dupCnt%+1
CALL :DupeRoutine "%~1" "%~2" "%~3"
) ELSE (
IF NOT EXIST "%dest%\%~2_(%dupCnt%)%~3" ECHO F | XCOPY /Y /F "%~1" "%dest%\%~2_(%dupCnt%)%~3" /Q /F "%~1"
SET "dupCnt=1"
)
GOTO :EOF
Here is another thing, if you want to copy files after a certain date then put date inside this query like this:
On line 11
XCOPY /D /D:06-05-2020 /F /Y "%%~FA" "%dest%\" && IF EXIST "%%~FA" /Q /F "%%~FA"
On line 23
IF NOT EXIST "%dest%\%~2_(%dupCnt%)%~3" ECHO F | XCOPY /D /D:06-05-2020 /Y /F "%~1" "%dest%\%~2_(%dupCnt%)%~3" /Q /F "%~1"
The date is in this format MM-DD-YYYY, also you can add other files extensions in FileList=