Rick said:
@echo off
xcopy ..... || goto BadCopy
Can you explain this? I'm not sure I understand it. Thanks.
===============
There are four uses of the | and & characters in batch files:
1. dir c:\ | find.exe /i "rick"
This is the "pipe" symbol. It "pipes" the output from the "dir" command into
find.exe.
2. dir c:\ & set name=rick
This is the continuation symbol. It lets you run two or more commands with a
single command line.
3. xcopy.exe && goto Error
This is the conditional execution symbol. It executes the command that
follows it only if the %ErrorLevel% of the preceding command was 0.
4. xcopy.exe || goto Error
This is also a conditional execution symbol. It executes the command that
follows it only if the %ErrorLevel% of the preceding command was greater
than 0.