General Question
How can I get a batch file to type the current time/date to a text file?
Asked by XOIIO (18328)
September 19th, 2010
I know you use “TYPE example >filename” to add or place text into a filename, but hoe can I get it to put a variable in.
I’ve tried “TYPE %TIME% >filename” but it always messes up.
I also need it to use any variable I want it to use text from any vaiable such as
“set /p note=
if ’%note%’==‘2’ GOTO b
if ’%note%’==‘1’ GOTO a”
and put the text from the user input into a text file.
Also if you know of a command to display all the text froma certain text file that would be great. Thanks.
Observing members:
0
Composing members:
0
6 Answers
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.
Have a question?
Ask Fluther!