Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Test>type test.bat @echo off set /p=a <nul type a.txt C:\Test>test.bat a 123456789