0

FOR /F "tokens=*" %%g IN ('move a.txt b.txt') do (SET VAR=%%g)

How can I suppress error message of MOVE? Without FOR, I can do >nul. But in FOR, >nul is getting error.

Thanks!

I tried to put >nul before move, within single quote, or after single quote. None of them worked

qazzzlyt
  • 9
  • 2
  • 2
    `2^>nul` - device 2 is stderr, where error messages should appear. the caret tells `cmd` the `>` belongs to the `move`, not the `for` – Magoo Feb 09 '23 at 13:27

0 Answers0