FTP Upload and Download Office File
FTP is more reliable in terms of data corruption. It might be faster (better packet recovery. It is also resumable.
Download Office Viewer Component and View Sample Projects
FTP Upload/Download Methods
boolean FtpConnect(BSTR WebUrl, [in, optional] VARIANT WebUsername, [in, optional] VARIANT WebPassword)
Creates a FTP connect.
boolean FtpDownloadFile(BSTR RemoteFile, BSTR LocalFile)
Downloads a file from remote server then save it to local
file with FTP.
RemoteFile: The remote file path which saves to FTP site.
LocalFile: The full file path which downloads to the local disk.
boolean FtpUploadFile(BSTR LocalFile, BSTR RemoteFile, boolean OverWrite)
Uploads a local disk file to remote server with FTP.
LocalFilePath: The full file path needs to upload to the server. It the
parameter is NULL, the function will add the file which is opening in the
component.
RemoteFile: The remote file path which saves to FTP site.
OverWrite: Overwrites the existed file if the same file exists at the FTP
server.
boolean FtpDisConnect()
Closes the FTP Connect.
The following code demos how to download a file to local disk with the FTP mode.
FTP Download Examples
<script language="vbscript">
Sub UploadFileviaFTP()
EDOffice.FtpConnect "ftp.edrawsoft.com", "username", "password"
EDOffice.FtpDownloadFile "ftp.edrawsoft.com/archieve/001.doc", "c:\temp.doc"
EDOffice.FtpDisConnect
End Sub
</script>
Free Download Office Viewer Component and View Sample Projects