How to Make a Log File

Open Notepad., Add this code to the top line of the text file: "echo %date% %time% >>log.txt". , Click "Save As" from the file menu, and write your file name in the format shown below., Save it in the folder where you want to see the log file.

5 Steps 1 min read Medium

Step-by-Step Guide

  1. Step 1: Open Notepad.

    "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 , 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.
  2. Step 2: Add this code to the top line of the text file: "echo %date% %time% >>log.txt".

  3. Step 3: Click "Save As" from the file menu

  4. Step 4: and write your file name in the format shown below.

  5. Step 5: Save it in the folder where you want to see the log file.

Detailed Guide

"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 , 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.

About the Author

K

Kayla Ford

Enthusiastic about teaching home improvement techniques through clear, step-by-step guides.

68 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: