Microsoft KB Archive/265260

= CRS: Use of Project Filters at the Command Line =

Article ID: 265260

Article Last Modified on 6/28/2004

-

APPLIES TO


 * Microsoft Site Server 3.0 Standard Edition
 * Microsoft Site Server 3.0 Commerce Edition

-



This article was previously published under Q265260



SUMMARY
You can use command line options for Microsoft Content Replication System (CRS) to automate the content replication process.

Note, that you must be careful when you use filters with the project.

This article covers the following topics regarding the use of project filters at the command line:


 * How to include filters when you add a CRS project by using &quot;crs addproj&quot; or &quot;sscd addproj&quot;.
 * Syntax for including filters for more than one directory.
 * Syntax for dealing with filename, and directory names that have space characters.



How to Include Filters
To add a project from a command line with filters, use code similar to the following: CRS AddProj   [Dest1 | Route1] [...] [/Filter ] [GlobalFlags]

The [Global Flags] includes: /Server  /User [pass | *] For Filters:

 + Includes the file or directory filter. - Excludes the file or directory filter. \        Applies the filter to directories. ...\     Applies the filter to all sub directories. A file or directory filter that can use wildcard characters.

Example: /Filter &quot;+text1.txt -*.exe -dir1\ +...\*.jpg&quot; This filter would include text1.txt, exclude all files ending in .exe that exist in the project root directory, exclude the directory dir1, and include all *.jpg files in the entire directory tree.

How to Include Filters for More Than One Directory
To include more than one directory in the filter, use code similiar to the following: CRS Addproj MyProj_1 c:\sourceDir c:\destDir /Filter &quot;-dir1\ +dir2\ &quot; NOTE: Make sure that there is a space after the last backslash (&quot;\&quot;) and before the closing quotation mark.

You can also use wildcard for directories. For example, to exclude the _vti_* directories that are installed with Microsoft FrontPage Server Extension (FPSE) and to include directories named myWeb## use the following: CRS Addproj MyProj_1 c:\sourceDir c:\destDir /Filter &quot;-_Vti*\ +myWeb*\ &quot;

How to Deal with Filnames and Directory Names with Space Characters
Space characters inside the filename or directory name may cause problems in the command line syntax for CRS project filters.

There are several ways to work around this depending on the filtering needs. For example, you may consider the use of wildcards to bypass the space in a name. For example, to exclude a subdirectory under the replication root named &quot;My Folder&quot;, use the following: CRS Addproj MyProj_2 c:\sourceDir c:\destDir /Filter &quot;-My*\ &quot;

Additional query words: CRS CD Content Deployment Site Server Publishing addproj filters

Keywords: kbbug kbfix KB265260

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.