S
Stephen Quist
Hi all,
I'm using an xcopy command line in a batch file that looks like this,
xcopy /R /C /E /Y /D /z /exclude:i:\netdir\excludelist.txt i:\netdir %1
to distribute updated files to local machines.
I'd like to test the result of the xcopy to see if any files were copied.
The help indicated that after the command errorlevel should be 0 if the
files were copied without error and 1 if no files were found to copy.
What I find is that the return value is always 0, even when no files
were actually copied! This does not seem like expected behavior to me.
Am I doing something wrong here?
Also, tell me if I'm remembering a dream. I thought there was a way
to run xcopy in a test mode where it would set the return code according
to the result of running the command, but no actual files would be copied.
Does this sound familiar to anyone?
Thanks,
Steve
I'm using an xcopy command line in a batch file that looks like this,
xcopy /R /C /E /Y /D /z /exclude:i:\netdir\excludelist.txt i:\netdir %1
to distribute updated files to local machines.
I'd like to test the result of the xcopy to see if any files were copied.
The help indicated that after the command errorlevel should be 0 if the
files were copied without error and 1 if no files were found to copy.
What I find is that the return value is always 0, even when no files
were actually copied! This does not seem like expected behavior to me.
Am I doing something wrong here?
Also, tell me if I'm remembering a dream. I thought there was a way
to run xcopy in a test mode where it would set the return code according
to the result of running the command, but no actual files would be copied.
Does this sound familiar to anyone?
Thanks,
Steve