Skip to main content

Featured

WIN ALL ACTEVETED LIFETIME

  Search for: Recent Posts Simple trick to install Windows 11 on an old PC Easy ways to activate Windows 11 for FREE without a product key Remove “You may be a victim of software counterfeiting” notification Windows Defender detects my scripts as “HackTool:BAT/AutoKMS” Quickly convert Windows Server Evaluation edition to the retail one Easiest way to remove the Windows watermark from your screen Categories Computer Tips Microsoft Software Products 2 ways to activate Windows 10 for FREE without additional software Posted by  Always Smile   in  Microsoft Software Products  /  Last updated on  August 26, 2021 As you know, Microsoft notified Windows 10 is “the last version of Windows” and explained that they will be focused on the development of powerful and new features under the guise of software updates instead of building a new version. This means there will be no Windows 11 or 12 in the future(*). So if you are thinking about an upgrade, this is the b...

time

 

Echo time to file

Below are examples of how you can echo the time to a text file to create a time log.

echo Logged time = %time% %date%>> log.txt

The above example will append "Logged time = 4:50:09.96 Thu 08/31/2019" to the log.txt file. We like this method of logging because it gives you the most information in a single line format.

Below are some older suggestions for earlier versions of Windows and that are submitted to us by visitors to our site.

ECHO. |TIME > TIME
COPY LOG.TXT +TIME
echo. |time |find "current" >> log.txt
Note

For the above batch file's to work properly, you must create a file called log.txt. If this file is not created, you receive an error message.

An alternate and slightly more complicated method that may not work in all versions of Windows.

echo @prompt set date=$d$_set time=$t$h$h$h > {a}.bat
%comspec% /e:2048 /c {a}.bat > {b}.bat
for %%v in ({b}.bat del) do call %%v {?}.bat
echo %date% %time% >> log

Comments

Popular Posts