Uploading Files (Upload)

Use the Upload method to transfer a file or folder from a local hard drive to a remote server.

Syntax

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

Parameters

strRemoteName

This is optional; use it only if you want to change the destination name or path for the uploaded files or folders. You can use absolute or relative paths.

strLocalName

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

nMultiPartNumber

Use this to split the upload 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 'r;Recommended: call connect first

MySite.RemoteFolder = "Temp"

MySite.LocalFolder = "C:\123"

'using relative path, all files in folder 123 are uploaded to the folder Temp off the current folder on the server.

MySite.Upload "*.*"

Configuration Notes