CReplicationProject.LocalDirectory Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets or sets the local directory for the Commerce Server Staging (CSS) project.

object LocalDirectory { set; get; }

Return Value

A string that contains the local directory for the project.

Remarks

The LocalDirectory property is a mandatory property. For Web content and Internet Information Services (IIS) metabase projects, it specifies the directory that contains the data to be staged. For business data projects, it specifies where the business data to be exported or transmitted will be stored.

Note

You must specify the directory on the source staging server only. On destination servers, CSS automatically creates the folder.

The CReplicationProject.LocalDirectory property corresponds to the COM property named ReplicationProject.LocalDirectory.

Example

The following example creates a new project named Test. This project deploys content from the local directory C:\Tmp to the destination server http://www.mytestmachine.com. Because the Flags property is set to 4096, the project replicates C:\Tmp, but it does not replicate the subdirectories under C:\Tmp.

CReplicationServer replicationServer = new CReplicationServer();
  replicationServer.Initialize("");
  CReplicationProject replicationProject = (CReplicationProject)replicationServer.OpenProject("Test", CSS_PROJECT_CREATION.CREATE_NEW_PROJECT);
  replicationProject.AddDestination("mytestmachine");
  replicationProject.set_LocalDirectory(@"C:\Tmp");
  replicationProject.set_Flags(4096);
  
  replicationProject.Commit();
  replicationProject.Start(0);

See Also

Other Resources

Projects

How to Create and Modify a Staging Project

CReplicationProject.Get Method

CReplicationProject Class