set BATCH_PATH=%~dp0
set ERROR_CODE=1
set COMPORT=%1
cd /d %~dp0
start %BATCH_PATH%tftp\tftpd32.exe
ping -n 3 127.0.0.1 > NUL
%BATCH_PATH%tterm\ttpmacro %BATCH_PATH%scripts\Update.ttl %COMPORT%
IF  EXIST C:\Temp\tc3_exitcode.txt set ERROR_CODE=0
taskkill /im "tftpd32.exe"
exit %ERROR_CODE%
