home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
t
/
tsbat.zip
/
TSBAT.EXE
/
LASTBOOT.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-09-19
|
1KB
|
46 lines
echo off
echo.
echo ┌───────────────────────────────────────────────────┐
echo │ LASTBOOT the date and time of the previous boot │
echo │ By Prof. Timo Salmi, ts@uwasa.fi, Sat 19-Sep-1992 │
echo └───────────────────────────────────────────────────┘
if "%1"=="" goto _help
echo.| date | find "Current" > tmp$$$.bat
echo set date_=%%3 %%4> current.bat
call tmp$$$
echo.| time | find "Current" > tmp$$$.bat
echo set time_=%%3,%%4> current.bat
call tmp$$$
if exist tmp$$$.bat del tmp$$$.bat
if exist current.bat del current.bat
rem Record time and date of the current boot
echo. > newboot.$$$
echo %date_% %time_%>> newboot.$$$
echo -------------------------->> newboot.$$$
set date_=
set time_=
rem Display the last boot and replace
if exist oldboot.$$$ type oldboot.$$$
if not exist oldboot.$$$ echo Boot date and time recorded
copy newboot.$$$ oldboot.$$$ > nul
del newboot.$$$ > nul
goto _out
:_help
echo.
echo To get the information when your system was last booted put the
echo following line in your autoexec.bat:
echo.
echo call LASTBOOT YourInitialsOrWhatever
echo or
echo %comspec% /e:1024 /c LASTBOOT YourInitialsOrWhatever
goto _out
:_out
echo on