I am trying this command to copy profile of users only in my text file from an old server to a new server, and I am getting %%i was unexpected error.
for /f %%i in (userprofiles_v1.txt) do robocopy.exe "\\oldserver\userprofiles\%%i" \\newserver\userprofiles /MIR /COPY:DATSO /W:5 /R:10 /V /LOG:C:\users.log
Would someone advise how to correct?
Please advise if there is a better way. What is the equivalent command in powershell (if using powershell is better) ?