After I copy an entire directory using xcopy, I want to verify that all the files got copied across as it often seems to fail. I'm trying to do it by looping through each file in the source directory and then checking it exists in the destination directory.

I have something that seems to work on my machine but doesn't seem to on the build machine, which is where I need it.

```
@echo off
set /a count=0
set /a count2=0
for /r "C:\work\DLS\built\Android_EU\data" %%f in (*) do (set /a count+=1
)

for /r "C:\work\DLS\TegraProject\DLS\assets" %%f in (*) do (set /a count2+=1
)

echo count is %count%
echo count 2 is %count2%

if %count%==%count2% echo equal
if not %count%==%count2% echo not equal

pause

if %count%==%count2% exit 0
if not %count%==%count2% exit 1

```

I checked manually and there are 594 files in both folders on both machines.

It's reported correctly on my machine.

On the build machine, it says there are 583 and 584 files. Is there any reason that would skip files?

Thanks,

Chris.