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
Switch | Option |
---|
+filter | Includes a file
filter or a directory filter |
-filter | Excludes a file
filter or a directory filter |
\ | Applies a filter to directories |
...\ | Applies a filter to all subdirectories |
filter | A
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*\ "