X
wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 9 people, some anonymous, worked to edit and improve it over time.
This article has been viewed 65,037 times.
Learn more...
You can create a log file without using a compiler. Here is the simplest and smallest way to create log files in Windows operating systems.
Steps
-
1Open Notepad.
-
2Add this code to the top line of the text file: "echo %date% %time% >>log.txt".Advertisement
-
3Click "Save As" from the file menu, and write your file name in the format shown below.
- "Name.bat"
- Note: You have to type all 10 characters of the above line
- Later you may change the 4 characters of Name (4 characters before Dot)
- The first and last 5 characters are to be written as it is
-
4Save it in the folder where you want to see the log file.
- Note. Whenever you open Name.bat file( batch file) your log file (log.txt) will get updated. It will contain list of dates and times at which it was opened.
- Note. Whenever you open Name.bat file( batch file) your log file (log.txt) will get updated. It will contain list of dates and times at which it was opened.
Advertisement
Community Q&A
-
QuestionHow can I insert a picture?Community AnswerWhen you right-click over a picture, a drop down menu appears. From the menu, select "copy image. Then, use CTRL + V to paste.
Advertisement
Warnings
- Once you create a task it will work as you directed it with no restrictions over itself.⧼thumbs_response⧽
- Don't forget to remove the scheduled task after your need of log is over. Just deleting the batch file and log file won't cleanup your computer.⧼thumbs_response⧽
Advertisement
Things You'll Need
- Windows operating system (The above works perfect with Window Vista, but ways to use Task Scheduler may change slightly with other versions of Windows (xp or 7).)
About This Article
Advertisement