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.
Step-by-Step Guide
-
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. -
Step 2: Add this code to the top line of the text file: "echo %date% %time% >>log.txt".
-
Step 3: Click "Save As" from the file menu
-
Step 4: and write your file name in the format shown below.
-
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
Kayla Ford
Enthusiastic about teaching home improvement techniques through clear, step-by-step guides.
Rate This Guide
How helpful was this guide? Click to rate: