home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
inne
/
podstawy
/
dos
/
4dos
/
4uzytki
/
ez-btm11.exe
/
LOADER.ZIP
/
KR.BAT
< prev
next >
Wrap
DOS Batch File
|
1994-05-16
|
2KB
|
78 lines
: KR.BAT
: Runs KERMIT, then records working time in a log of the month (the log
: is created by this batch file for each month under the name KERM-mmm.LOG
: (where 'mmm' stand for the first three characters of the month's name).
:
: When shelling to DOS, if your prompt was designed to show which
: pgm is loaded, it will indicate that Kermit is on. (See 4start.btm for
: formula.)
: Itamar Even-Zohar (itamarez@plato.tau.ac.il)
setlocal
set kermpath=C:\KR
REM ^^^^^ change as appropriate.
set compuname=%@label[%_disk]
cdd %kermpath
:: set compuname=%@lower[%@label[%_disk:]]
:: if .%compuname==.xxxxxxxx goto pgms
:: (You can cancel the whole report procedure by activating
:: the above lines, and the line at 'abolish:' below.
:: Replace 'xxxxxxxx' by the label of your computer.
gosub log_name
timer | set tm=%@LINE[con,0]
rem sets timer's results on 'tm'
echo %_date, %_time, %tm >> %log_name
rem puts time, date & starting time into file %log_name
:pgms
iff not "%pgm"=="" then
set oldpgm=%pgm
set pgm=kermit(%pgm)
else
set pgm=kermit
endiff
cls
ks 0 %1 enter^kermit.exe -f mskermit.ini
: (when kermit is exited:)
set pgm=%oldpgm
set oldpgm=
:: :abolish
:: if .%compuname==.xxxxxxxx goto exit
:: (You can cancel the continuation of the report procedure by
:: activating the above line.)
timer | set tm=%@LINE[con,0]
echo %_date, %_time, %tm %@char[13] >> %log_name
unset tm
ks end^list %log_name
:exit
endlocal
quit
:-----------sub-routine----------------
:log_name
set date=%@SUBSTR[%_date,0,2]
iff %date==01 then ^ set da=Jan
elseiff %date==02 then ^ set da=Feb
elseiff %date==03 then ^ set da=Mar
elseiff %date==04 then ^ set da=Apr
elseiff %date==05 then ^ set da=May
elseiff %date==06 then ^ set da=Jun
elseiff %date==07 then ^ set da=Jul
elseiff %date==08 then ^ set da=Aug
elseiff %date==09 then ^ set da=Sep
elseiff %date==10 then ^ set da=Oct
elseiff %date==11 then ^ set da=Nov
elseiff %date==12 then ^ set da=Dec
endiff
set log_name=KERM-%DA.LOG
if not exist %kermpath\%log_name (echo %log_name > %kermpath\%log_name)
return