在VB中进行FTP软件开发时用到的两个基本模块,上传文件和下载文件,两函数都挺简单,函数代码如下示:
一、FTP上传文件函数:
1 | Public Function PutFTPFile( ByVal localFile As String , ByVal strRemoteFile As String ) As Boolean |
6 | Info = FtpPutFile(lngInetConn, localFile, strRemoteFile, 1, 0) |
FTP上传文件函数参数:strRemoteFile 远程文件名;localFile 本地文件名。
二、FTP下载文件函数:
1 | Public Function GetFTPFile( ByVal strRemoteFile As String , ByVal localFile As String ) As Boolean |
6 | Info = FtpGetFile(lngInetConn, strRemoteFile, localFile, 0, 0, 1, 0) |
FTP下载文件函数参数:strRemoteFile 远程文件名,localFile 本地文件名。
|