3

Is it possible to run robocopy in some sort of "completely silent" mode?

RCIX
  • 134
  • 1
  • 8

1 Answers1

8

Any command-line utility can be made completely silent by redirecting stdout and stderr to the special file 'nul'. This is Windows' equivalent to /dev/null on *nix systems.

command >nul (stdout is not echoed)

command 2>nul (stderr is not echoed)

command >nul 2>&1 (neither stdout nor stderr is echoed)

The latter is the one you want to make it completely silent.

ThatGraemeGuy
  • 15,314
  • 12
  • 51
  • 78
  • 1
    `>nul`is batch syntax and not valid for powershell... Use `>$null` instead. (Applies, if robocopy is triggered from PS rather than BAT) – dognose May 11 '17 at 20:26