How to output batch command to null

@echo off
mode con:cols=40 lines=2
echo somestring|clip
cls
echo Wireless Password copied to clipboard.
timeout 2 > NULL

How do I make timeout not print any text?

1

2 Answers

You may need to redirect both stdout and stderr:

timeout 2 >NUL 2>NUL

Note that the special device is NUL or NUL:, with a single L.

1

Interesting (and annoying) fact for latest Windows 10: Microsft does not allow piping into nul any longer.

Update: This was a bug in Win10-Insider v18990. It is fixed in v18995.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like