Let us start with the Folder Difference invocation. Both Power Toy TreeDiff and Orcas Folder Difference support command line invocation as well as from the Source Control Explorer in Visual Studio.
Starting from the Command Line
In the Orcas CTP, Folder Difference is integrated into tf.exe with command folderdiff or treediff (as a command alias).
>tf folderdiff /?
TF - Team Foundation Source Control Tool
(C) Copyright 2007 Microsoft Corporation. All rights reserved.
Displays a visual representation of the differences between files in two server
folders, in a server folder and a local folder, or in two local folders.
tf folderdiff [sourcePath] targetPath [/recursive] [/noprompt]
The new options are:
Semicolon delimited list of inclusion and exclusion filter masks. Default is “*” (include all). See "File and Folder Filter" below.
If this parameter is specified, only the local paths will be filtered, unless the corresponding server path exists. If not specified, the filter is applied to both server and local paths.
This option tells Folder Difference what files to show in the result window. The option is comma-separated list of the following values:
files with the same content in both source and target directories will be included
files with different content in both source and target directories will be included
files that exist only in source directory will be included
files that exist only in target directory will be included
The default is “/view:Different,SourceOnly,TargetOnly” which lists only the files that are different or missing.
File and Folder Filter
A filter is an ordered list of name masks that are used to match the name of files and folders to be compared.
Each mask can contain the wildcard characters ? and *. ? matches exactly one character and * matches zero or more characters. The masks in a filter are delimited by semicolons (;). Folder masks must end in backslash (\). To specify an exclusion mask, prefix the mask with an exclamation mark (!).
The filter is applied to the file and folder names using the following rules:
Here are some examples:
Matches all C# files and excludes objd, obj, and bin directories
Excludes all resx and ini files as well as the resources folders and those having "junk" in the name
Starting from Visual Studio
Folder difference can be started from various location in Visual Studio.
Note that the Compare menu item is context sensitive. A file comparison dialog will be presented for file selection and a folder comparison dialog will be presented for folder selection.
That's it for this installment of Orcas CTP Folder Difference. Next time, we'll talk about changes in the Visual Studio integration which will include the new folder compare dialog and the results window.