You can use rem to comment out any part of a batch file that you don’t want to run; And it’s a good practice to include comment on your batch file because people tend to forget important details when they have done something for a while.
In this post, I will comment out the creation date of the script, the name of the website and the description of the script to help you remember what the script does.
The batch file will create a text file in my YouTube directory. The YouTube folder is located in the root of the partition letter C of my Windows 10 computer. The file contains today’s date, time and the current version of Microsoft Windows on the computer.
To create the batch file, open a text editor such as Microsoft Windows Notepad, and then type the command below.
rem date of creation: April 10, 2020
rem website: htopskills.com
rem description: This batch file creates a text file name current-news in the YouTube directory which is in the root of the partition c. The file contains today's date, time and the current version of Microsoft Windows installed on the computer.
date /t > c:youtubecurrent-news.txt
time /T >> c:youtubecurrent-news.txt
ver >> c:youtubecurrent-news.txt
Give the file a name and save it with the bat extension.
When you run the batch file, a new text file name current-news will be created in the YouTube directory.
What To Read Next
- How to create local account in windows 10 using Command Prompt
- Enable remote desktop on Windows 10
- How to shutdown Windows 10 using command prompt
- How To Find Original Windows 10 Product Key