Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Description of how to use Commerce Server Staging (CSS) project filters at a command prompt


View products that this article applies to.

Introduction

You can use command-line options for Commerce Server Staging (CSS) to automate the content replication process. You can also use a filter switch at a command prompt when you add a CSS project in Microsoft Commerce Server 2007. This article describes how to use CSS project filters at a command prompt.

↑ Back to the top


More information

Syntax for including filters when you add a CSS project by using the css addproj command

To add a CSS project from a command line by using filters, type the following command:
css addproj projectname sourcedirectory [destination1 | route1] [...] [/filter filters] [globalflags]
Note The globalflags variable includes the following switches:
  • /server servername
  • /user username [pass | *]
Filter switches have the following options.
Collapse this tableExpand this table
SwitchOption
+filterIncludes a file filter or a directory filter
-filterExcludes a file filter or a directory filter
\Applies a filter to directories
...\Applies a filter to all subdirectories
filterA file filter or a directory filter that can use wildcard characters
The following is an example of a filter that has switches:
/filter "+text1.txt -*.exe -directory1\ +...\*.jpg"
This filter does the following:
  • Includes the Text1.txt file
  • Excludes all files that end in .exe that exist in the project root directory
  • Excludes the Directory1 directory
  • Includes all *.jpg files in all the directory trees

Syntax for including more than one directory in a filter

To include more than one directory in a filter, type the following command:
css addproj projectname c:\sourcedirectory c:\destinationdirectory /filter "-directory1\ +directory2\ "
Note Make sure that there is a space character after the last backslash (\) and before the closing quotation marks.

You can also use wildcard characters in directory names. For example, you can exclude the _vti_* directories that are installed with FrontPage Server Extensions from Microsoft. Additionally, you can include all directories that have names that start with myWeb, such as myWeb01. To do this, type the following command:
css addproj projectname c:\sourcedirectory c:\destinationdirectory /filter "-_vti*\ +myweb*\ "

Syntax for file names and for directory names that have space characters

Space characters in a file name or in a directory name may cause problems in the command line syntax for CSS project filters. To work around these problems, you can use wildcard characters to bypass the space character in the name. For example, you can exclude a subdirectory under the replication root directory that is named My Folder. To do this, type the following command:
css addproj projectname c:\sourcedirectory c:\destinationdirectory /filter "-my*\ "

↑ Back to the top


Keywords: KB921487, kbinfo, kbhowto

↑ Back to the top

Article Info
Article ID : 921487
Revision : 2
Created on : 7/25/2006
Published on : 7/25/2006
Exists online : False
Views : 382