powershell - robocopy run once -


i executing robocopy command source on , destination local folder. when robocopy runs , server down, keeps repeating , retrying find folder every 30 seconds. robocopy run once, , return true if succeeded , false if failed.

when in doubt, read documentation:

/r:<n> specifies number of retries on failed copies. default value of n 1,000,000 (one million retries).

run robocopy source destination /r:0 disable retries. check exit code command status.


Comments