@echo off echo This is a test> test.txt echo 123>> test.txt echo 245.67>> test.txt rem Or you can use variables: set a=%RANDOM% echo %a% > test.txt