How To Create Your Own Computer Digital Clock Using Notepad

preview_player
Показать описание
You can make a digital clock of your own with just 13 lines of code, you just have to follow these 3 steps:

Step 1

Open notepad and write the below script.

@echo off
Title Digital clock
@mode con cols=25 lines=5
color 00
:main
cls
echo.
echo Time:%time%
echo.
echo Date: %date%
echo.
ping -n 2 0.0.0.0nul
goto main

Step 2

Step 3

Open this .bat file wherever it is saved, either double click on it or right click and click on open.

Here is your digital clock!!!

nul is used to redirect it to null. So, this would output nothing.

Line 13

Usually the script execution is from top to bottom line-wise but sometime we want the script to repeat a certain part of the code or want to start execution from a different point. Then we use goto, along with a label, which tells goto where to go (in this case :main- line5)
Рекомендации по теме