I have a batch file to copy some files from computer A to computer B using the XCOPY command that runs every night. The problem is, if the XCOPY command fails (because for instance computer B was turned off), I would never know. So far I've been checking manually folder by folder everyday to see if the batch file worked OK but that job is getting tiresome. I want to add to my batch file some sort of log recording capabilities. I know I can use ERRORLEVEL to check if XCOPY was successful but how can I make the batch file to send (or copy) this information in a log file using timestamps?