Xcopy and batch file

Tags:
Locked

Xcopy and batch file

Hi

I have created a batch file which copies new and changed files from a networked storage device to a computer

I am using the xcopy command and have used the following syntax:

start /wait /b xcopy "source" "destination" /c /d /s /e /k /y /z /i

at the start and end of the batch file I have included eventcreate commands to log when the batch file starts and finishes

Now, when I was testing the file, I see a command window, and can see that the eventcreate command successfully writes entries to the application log stating the batch file has started, and later an entry is written stating the file has finished. However, after the second eventcreate command has been processed, and I can see the event in the application log, the batch file continues.

When the batch file runs the command window shows the full path for each command in the batch file:

c:\computers\Batch files\Backup\start /wait /b xcopy "source" "destination" /c /d /s /e /k /y /z /i

After the second eventcreate command has been processed I see a long list of:

0 files copied
1 files copied
0 files copied
0 files copied
5 files copied
"source"/filename.ext
0 files copied
2 files copied

Does anyone know what is happening here? I assumed that the second eventcreate command at the end of the batch file would be the last command to be processed, especially as all preceeding commands use the start /wait switch.

I was wondering if this was a verification process... but think not.