Hi EE. As I continue to build this monster batch file, I want to include code that checks if there is a file in the directory with the same name of the one being copied that the copy aborts and records this error. This is what I have so far:
if not exist group xcopy \\myserver\nfs\group c:\tools\ /y && (
ECHO File was copied at %time% >>"%logfile%
) || (
ECHO File was not copied at %time% >>"%logfile%
In the code above, the script does check and skips the xcopy if the file is already in the directory but I would like for that action (file xcopy skipped) to be reported to the %logfile%.
Thank you for your help!