You can create a batch program to perform xcopy operations and use the batch if command to process the exit code if an error occurs. For example, the following batch ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results