robocopy [Whatever Options] | findstr "Copied files"
will get you down to just the final report.
You just need to parse out for the actual number, which you can do with a for
loop.
I would help you more, but you did not show any code.
When I run robocopy, the output I get looks like:
Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 12 12 0 0 0 0
Bytes : 49.91 m 49.91 m 0 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00
This is very different from your report that you see Copied Files - X
.
I think this is getting close to what you want:
setlocal enabledelayedexpansion
for /f "tokens=3 delims=: " %%a in ('robocopy [options] ^| findstr /C:Files ') do (
set num=%%a )
echo Files That Got Copied: %num%
(lightly tested, it seems to work)