In Windows, either in command line or a batch file, the command DIR 2>NUL: 3>&2 (you can replace DIR with anything, even if isn\'t a file
DIR 2>NUL: 3>&2
DIR
The problem is with 3>&2. File descriptor 3 isn't valid, and it appears to upset Windows in some way. Leave it off, you don't need it.
3>&2
See Microsoft's documentation (archived) for the full treatment.