How can I write batch sync command with a timestamp log file in Windows 10?

You are running this from PowerShell, and not regular Command Prompt?