CALL C:\LiveDigital\config.bat

CD C:\LiveDigital

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

SET _my_datetime=%_mydate%_%_mytime%

IF "%var_is64%"=="1" (
	nircmd.exe savescreenshotfull C:\LiveDigital\screensaves\%_my_datetime%.jpg
) ELSE (
	nircmd86.exe savescreenshotfull C:\LiveDigital\screensaves\%_my_datetime%.jpg
)

ncftpput.exe -DD -m -u %var_ss_username% -p %var_ss_password% %var_ss_server% "screenshots/client_%var_client%/screen%var_screen0%" "%var_livedir%\screensaves\%_my_datetime%.jpg"

IF "%var_is64%"=="1" (
	wget64.exe --timeout=5 --tries=2 --delete-after "%var_pingaddress%%var_pingscript%?clientid=%var_client%&serverip=%var_supportip%&type=screensave&value=%_my_datetime%"
) ELSE (
	wget.exe --timeout=5 --tries=2 --delete-after "%var_pingaddress%%var_pingscript%?clientid=%var_client%&serverip=%var_supportip%&type=screensave&value=%_my_datetime%"
)

PING 127.0.0.1 -n 4

DEL "%var_livedir%\screensaves\%_my_datetime%.jpg"