1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
@echo off setlocal for /f "tokens=1-3 delims=/" %%a in ("%Date%") do ( set mm=%%a set dd=%%b set yy=%%c ) set TimeStamp=%yy%-%mm%-%dd% set Source=C:\Important Files set Target=C:\Important Backup\%TimeStamp% ECHO robocopy "%Source%" "%Target%" *.* /e /r:0 /tee /nfl /ndl /np /log+:"%~dpn0-%timestamp%.log"