Property

Method

Event

Enterprise

 

FtpOverwrite

Determines how to deal with file(s) with the same filename on the remote site when transferring files to the FTP server.

Syntax

    [get]HRESULT FtpOverwrite(
    long* pVal
    );
    [put]HRESULT FtpOverwrite(
    long newVal
    );

Parameters

[get]pVal

[out, retval] Returns the method specified before.

[put]newVal

[in] Determines how to deal with  file(s) with the same filename on the remote site when transferring files to the FTP server.

0

Saves the file being transferred after modifying its filename. (Default)

1

Overwrites the file with the same filename.

2

Saves the file being transferred after changing the file on the FTP server  into a backup (*.bak) file.

Return Values

0 (Always)

Remark

In a default setting, which saves the file being transferred after modifying its filename, the changed filename can be checked with OnFtpUploadComplete.

Sample Codes

VBScript

dim files()
dim object
set object = Document.editForm
object.wec.FtpFileScope = 0
object.wec.FtpFileFilter = 0
' If there exists a file with the same filename, the file being transferred is saved after
the file on the FTP server is changed into a backup (*.bak) file.

object.wec.FtpOverwrite = 2
object.wec.FtpPassiveMode = 1
object.wec.FtpPort = 21
object.wec.FtpUserName = "admin"
object.wec.FtpPassword = "adminxxx"
object.wec.FtpUpload "www.myhome.co.kr", "/public_html", "index.htm"
'GET
filescope = object.wec.FtpFileScope
filefilter = object.wec.FtpFileFilter
overwrite = object.wec.FtpOverwrite 'Gets the overwriting method specified before.
passivemode = object.wec.FtpPassiveMode
port = object.wec.FtpPort
username = object.wec.FtpUserName
password = object.wec.FtpPassword

See Also

FtpFileFilter, FtpFileScope, FtpPassiveMode, FtpPassword, FtpPort, FtpUpload, FtpUserName, OnFtpUploadComlated