79715437

Date: 2025-07-26 05:32:29
Score: 1
Natty:
Report link
:backUpFolder
set source="%~1"
set destination="%~2"
echo copying from %source% to %destination%

for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
set ldt=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2% %ldt:~8,2%:%ldt:~10,2%:%ldt:~12,6%

xcopy %source%"\*" %destination%"\*" /s/d/y/c/v/r

echo %ldt%: %source% to %destination% >> backHistory.log
echo Finished copying %source% to %destination%
goto:eof

Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: ANUBHAV