How to echo “2” (no quotes) to a file, from a batch script? May 23, 2023 by Tarik Little-known feature: The redirection operator can go anywhere on the line. >>file.txt echo 2