I have several batch files that are ran through Scheduled Tasks. The files do things such as making copies of files and running macros. I need a way to know if an event does not get carried out. If anyone could tell me how I would go about adding some error trapping where it could write it to a text file, I'd appreciate it.
Most executables will report 0 as ERRORLEVEL if everything went good and some higher numbers for different errors. Perhaps in your case you could try with some line like this after each COPY for example:
IF NOT "%ERRORLEVEL%"=="0" ECHO Copy error. >> C:\your-log-file.txt