Downloading Files (Download)

Use the Download method to transfer a file or folder from a remote location to your local hard drive.

Syntax

Object.Download (BSTR strRemoteName ,BSTR strLocalName , long nMultiPartNumber)

Parameters

strLocalName

This is optional. Use this only if you want to change the destination name or path for the downloaded files or folder. You can use absolute or relative paths.

strRemoteName

This is the path to the remote item you are downloading. You can use absolute or relative paths with or without wildcards.

nMultiPartNumber

Use this to split the download into multiple parts.  The default value = 1.  The value specifies the number of parts used for the download.

Example

Set MySite = CreateObject("CuteFTPPro.TEConnection")

'Specify user, pass, host, and connect as normal...

MySite.Connect 'Recommended: call connect first

'next line changes to a predetermined folder so you can use a relative path in the download method

MySite.RemoteFolder = "/c:/Inetpub/ftproot/Temp/Temp/"

MsgBox (MySite.RemoteFolder) 'display current remote folder

MySite.Download "agent.ini", "c:\temp\agent1.ini"

'now verify downloaded ok

If CBool(MySite.LocalExists ("c:\temp\agent1.ini")) Then

MsgBox "File downloaded OK."

End If

Configuration Notes: