- Aug
- 2,293
- 111
Code:
::--------------------------------------------------------------------+
:: BTASKS.BTM ::
:: Check the progress of your BOINC projects ::
:: ::
:: Joe Caverly - 2012/11/28 ::
:: ::
::--------------------------------------------------------------------+
@setlocal
@echo off
pushd
::
:: This is where BOINC is installed on my system.
:: Change if not the same for your system.
::
cdd "c:\program files\boinc"
::
:: Create a temporary file
::
set tfile=%@unique[]
::
:: Store all tasks into the temporary file
::
boinccmd.exe --get_tasks > %tfile
::
:: Search the temporary file for the tasks
:: Store the reults on the clipboard
::
ffind /k/m/v/t"fraction done" %tfile > clip:
::
:: Loop through the clipboard, and find tasks that are running
::
do tasks in @clip:
set percent=%@word[2,%tasks]
::
:: You can display the reults to the TCC window, or on the
:: statusbar
::
if %percent gt 0 echo %@eval[%percent*100] percent completed %_date %_time
::
:: I only analyze one task at a time on my system.
:: If you analyze more than one task at a time on your sytem, the
:: statusbar will be updated with the LAST running task on your
:: system
::
:: if %percent gt 0 statusbar %@eval[%percent*100] percent completed %_date %_time
enddo
::
:: Delete the temporary file
::
if exist %tfile del "%tfile" > nul
popd
endlocal