SendFile Method

This method sends a file to each destination server defined for the project.

Syntax

ReplicationClient.SendFile(File)

Parameters

File

The file to replicate. The file path should not include the full path, but should be relative to the project.

Remarks

You must have Site Server Publishing administrator privileges on the server to call this method.

If a connection has already been established, this function sends the file. Otherwise, it connects, sends the file, and disconnects, committing the file. If transaction processing is turned on at the destination servers, then the file transaction is not applied until either a Commit or Disconnect is called.

Since this method does not go through the Content Deployment service on the source computer, the replication information is not logged on the source computer.

Note

You cannot run both the SendFile method and a replication on a source  computer at the same time. If you attempt to run both, Content Deployment refuses and issues an error message.

Example

The following example sends the file Newfile.htm to the Project1 destination servers.

Option Explicit 
On Error Resume Next

dim Client
set Client = CreateObject("CrsApi.ReplicationClient")
Client.Initialize("Project1")
Client.SendFile("Newfile.htm")
'Release Client object
set Client = Nothing

See Also

ReplicationClient.DeleteFile, ReplicationClient.GetExtendedErrorInfo, SendFiles, ReplicationProject.EnumDestination


© 1997-1998 Microsoft Corporation. All rights reserved.