试试下面的方法:uses WinInetprocedure FtpPutTest; // Ftpvar hNet, hFTP: Pointer;begin inherited; hNet := InternetOpen('Test.exe', 1, nil, nil, 0); if hNet = nil then Exit; hFTP := InternetConnect(hNet, '127.0.0.1', 21, 'name', 'pass', 1, 0, 0); if hFTP = nil then begin InternetCloseHandle(hNet); Exit; end; if not FtpSetCurrentDirectory(hFTP, '/blacklist') then begin InternetCloseHandle(hFTP); InternetCloseHandle(hNet); Exit; end; try if FtpPutFile(hFTP, 'C:/test.txt', 'test.txt', 1, 255) then ShowMessage('Ftp上送成功。'); finally InternetCloseHandle(hFTP); InternetCloseHandle(hNet); end;end;祝你好运。