Dragon Time & Date

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Hemlok
Posts: 10
Joined: 17 Nov 2019 15:32

Dragon Time & Date

#1 Post by Hemlok » 17 Nov 2019 22:25

I know this is a simple batch file. I wanted to share it anyway for those interested. It tells you audibly the time, date, IP and mac address of your PC. I also included some cool dragon art to spice the result view up.

Copy the code exactly and paste it you know where..

Enjoy.

-Hemlok

Code: Select all

:::::::::::::::::::::::::::::::::::::::::::::
:: Dragon Time and Date                     :
:: Time, Date, IP and Mac address to Voice  :
:: By - Hemlok                              :
::                                          :
::                                          :
:::::::::::::::::::::::::::::::::::::::::::::
@echo off
color 0a
Title Dragon Time and Date
::Date
Set mm=%DATE:~4,2%
Set dd=%DATE:~7,2%
Set yy=%DATE:~10,4%
::ip
for /f "tokens=14" %%a in ('ipconfig ^| findstr IPv4') do set _IPaddr=%%a
::Mac
for /f "tokens=3 delims=," %%a in ('"getmac /v /fo csv | findstr Ethernet"') do set MAC=%%a 
::Time 
for /f %%a in ('time /t') do (
set standardtime=%%a
)
echo.        
echo                               ___====-_  _-====___ 
echo                          _--^^^      //      \\    ^^^--_
echo                       _-^          // (    ) \\         ^-_
echo                      -           //   \../   \\           -
echo                    _/           //   (0::0)   \\            \_
echo                   /            ((     \\//     ))             \ 
echo                 -               \\    (oo)    //               -
echo                -                 \\  / \/ \  //                 -
echo               -                   \\/      \//                   -
echo             / /.           /\      (        )      /\           .\ \
echo             ./ . /\_/\_/\_/  \_/\  (   /\   )  /\_/  \_/\_/\_/\ . \.
echo             `  ./  V  V  `    V  \_(. .  . .)_/  V    '  V  V  \.  '
echo                `   `  `       `   / . .  . . \   '       '  '   '
echo                                 .(  . .  . .  ).             
echo                                .__\_. .  . ._\__.           
echo                                ..... ...  ... .....
echo                               The time is: %standardtime%
echo                               The date is: %mm%-%dd%-%yy%
echo                               IP address: %_IPaddr%
echo                               MAC address: %MAC%
echo.
::voice
set "spk=The time is: %standardtime%. The date is: %mm%-%dd%-%yy%. Your IP address is: %_IPaddr%. Your Mac Address is: %MAC%. "
call :speak spk
:begin
set "spk="
set /p "spk=Speak: "
if not defined spk exit
set "spk=%spk:"=%"
call :speak spk
goto begin

:speak
setlocal enableDelayedExpansion
mshta "javascript:new ActiveXObject("SAPI.SpVoice").Speak('!%~1!');close();"
endlocal
pause
exit

Post Reply