xcopy /Y /E /H "C:\test1" "C:\test2"
Returns a number of files copied, how do I get that number as a variable?
Thanks in advance!
for /f "tokens=1" %%a in ('xcopy /Y /E /H "C:\test1" "C:\test2" ') do (
set copied_files=%%a
)
echo %copied_files%
not tested.