1.

Solve : How do I ask for input from user and output to a file??

Answer»

I am looking to have a batch FILE run at logon which would ask a USER for his name and then OUTPUT it to a log file. I am unsure how to do so.Code: [Select]@echo off
set /p USERNAME="Please type your name and press Enter "
echo %date% %time% %username% >> login-log.txt
Nice, Dias -- I knew about the redirect, but didn't KNOW how to "set" it! That worked! thanks for your help.



Discussion

No Comment Found