I'm currently using a batch script to run XCOPY to move contents from a source directory to a target directory. These contents that I'm moving also contain sub folders. These contents are not static paths and change with whatever folder (contents) I pass into this batch script. The script runs perfectly fine except today I noticed an error where XCOPY seemed to fail because there was some sort of network glitch between the target directory (another server) and me.
So what I need to do is put some sort of test in place inside this batch script file that can compare the source directory from the target directory to let me know if the XCOPY failed.
So here's the problem, I need to find a DOS command or something that can be called from the batch script program that can determine if the source directory is the same as the target directory and if not alert the user that there was a problem with XCOPY after the command runs.
I have been looking in the Resource Disk for Windows NT and XP but I can't find anything. Others out there must have run into this problem in the past and needed some sort of catch/test that would determine if XCOPY worked or not. Can anyone guide me in the right direction of such a test?