Set /p text= enter text: Echo %text%>"%COMPUTERNAME%.txt" Echo %text%
cmd /C Set /p text= enter text: &Echo %text%>"%COMPUTERNAME%.txt" &Echo %text%