SETLOCAL ENABLEDELAYEDEXPANSION
Set Folder1=C:\Folder1
Set Folder2=C:\Folder2
Set Extensions=*.*
Set DateNow=%Date:~-10%
Set DateNow=%Date:/=-%
Set TimeNow=%Time:~0,-3%
Set TimeNow=%TimeNow: =0%
Set TimeNow=%TimeNow::=.%
for /r "%Folder1%" %%a in (%Extensions%) do (
Set Dest=%%~dpna!DateNow!!TimeNow!%%~xa
Set Dest=!Dest:%Folder1%=%Folder2%!
ECHO f|XCOPY "%%a" "!Dest!"
)
|