LocalDirectory Property

This property specifies the local directory for the project.

Syntax

ReplicationProject.LocalDirectory[=Dir]

Parameters

Dir

The local directory.

Example

The following example creates a new project, Test, which pushes content from the local directory C:\Tmp to the destination server http://www.mytestmachine.com. The project replicates only C:\Tmp, but no subdirectories under it. It also uses fast mode, which implies a reliable connection.

Option Explicit 
On Error Resume Next 

const CREATE_NEW_PROJECT  = 1
const RF_EXCLUDE_ALL    = 4096
const RF_FASTMODE     = 128

dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")

'Create new push project
dim ReplProject
set ReplProject = ReplServer.OpenProject("Test", CREATE_NEW_PROJECT)

ReplProject.ReplicationMethod = "SENDINET"
ReplProject.Put("Destination", "http://www.mytestmachine.com/")
ReplProject.LocalDirectory = "C:\Tmp"
ReplProject.Flags = RF_EXCLUDE_AL
ReplProject.Flags = RF_FASTMODE

ReplProject.Commit
ReplProject.Start

'Release objects
set ReplProject = Nothing
set ReplServer  = Nothing

See Also

Get


© 1997-1998 Microsoft Corporation. All rights reserved.