To avoid the stream number thing, you need a space after the number, before the > symbol.
See here, the first try leaves number.txt blank
C:\>echo 5> number.txt
ECHO is on.
C:\>type number.txt
C:\>dir number.txt
07/04/2019 18:20 0 number.txt
C:\>echo 5 > number.txt
C:\>type number.txt
5when I generate number.txt with powershell it doesn't work
Why Powershell?
copy /y nul d:\number.txt
echo 5 >> d:\number.txt
Why are you doing this?
?
This works every time for me....
C:\>echo 5 > d:\number.txt
C:\>set /p out=<d:\number.txt
C:\>timeout /T %out%
Waiting for 0 seconds, press a key to continue ...
C:\>chcp
Active code page: 850Timeout waits correctly for 5 seconds, no CHCP change needed.