CALL C:\LiveDigital\config.bat

CD C:\LiveDigital

FOR /f "tokens=2-4 delims=/ " %%a IN ('date /t') DO (SET _mydate=%%c%%a%%b)
FOR /f "tokens=1-2 delims=/:" %%a IN ("%TIME%") DO (SET _mytime=%%a%%b)

SET _my_datetime=%_mydate%_%_mytime%

DEL C:\LiveDigital\tools\bandwidth\64-bit\result.txt
C:\LiveDigital\tools\bandwidth\64-bit\sqlite3.exe C:\LiveDigital\tools\bandwidth\64-bit\networx.db < C:\LiveDigital\tools\bandwidth\64-bit\query.sql > C:\LiveDigital\tools\bandwidth\64-bit\result.txt

SET var_down=0
SET var_up=0

FOR /F "tokens=1,2 delims=," %%G IN (C:\LiveDigital\tools\bandwidth\64-bit\result.txt) DO (
	SET var_down=%%G
	SET var_up=%%H
)

wget64.exe --timeout=5 --tries=2 --delete-after "%var_pingaddress%%var_pingscript%?clientid=%var_client%&serverip=%var_supportip%&type=bandwidth2&screen=%var_screen0%&value=%_my_datetime%&data_down=%var_down%&data_up=%var_up%"

C:\LiveDigital\tools\bandwidth\64-bit\sqlite3.exe C:\LiveDigital\tools\bandwidth\64-bit\networx.db < C:\LiveDigital\tools\bandwidth\64-bit\reset.sql

EXIT


