急求一个用vb写的ftp客户端代码

来源:百度知道 编辑:UC知道 时间:2024/06/30 19:52:29
想要一个用vb写的ftp客户端代码,请帮帮忙!
它要有浏览ftp目录,可以删除ftp的文件夹,最好还有上传,下载功能

传送文件,用 Inet 控件

Components -> Microsoft Internet Transfer Control 6.0

Private Sub FTPTxtFile()
Dim TRANSFER_STRING As String, PutString As String
Dim lSizeOfFile As Integer
Dim sLocalDir As String
Dim ftp As String

'

sLocalDir = GetSetting(gsTitle, "Settings", "LocalDir", "c:\")
If Right$(sLocalDir, 1) <> "\" Then sLocalDir = sLocalDir & "\"

'Set up FTP Connection
Inet1.URL = "ftp://" & sEdiAddr
Inet1.UserName = sEdiUser
Inet1.Password = sEdiPass
ftp = sEdiPath & sFTPFilename
Call check_EDI_execute

Inet1.Execute , "dir *.txt"
Call check_EDI_execute

'Transfer file
TRANSFER_STRING = "PUT " & sTxtFile & " " & ftp
'Inet1.Execute , TRANSFER_STRING
'Call check_EDI_execute

Inet1.Execut