View comments | RSS feed

dreamweaver.compareFiles()

Availability

Dreamweaver 8.

Description

This function launches the file comparison tool that the user installed in the Diff section of the Preferences dialog box.

Arguments

file1, file2

Returns

Nothing.

Example

The following example compares two files, red.htm and blue.htm:

dw.compareFiles(hc:\data\red.htm", "e:\data\blue.htm");

Comments


tom muck said on Nov 22, 2005 at 8:47 AM :
This function does not work. When using it I get "Type error: dw.compareFiles() is not a function"
LoriHC (Dreamweaver Team) said on Mar 24, 2006 at 10:45 AM :
Hi Tom: It's true that dw.compareFiles() is not a function. It should be site.compareFiles(). The code I'm looking at seems to indicate that only the first file argument is required. If called with a single file argument, Dreamweaver will ask the file comparison tool to compare the local version of the file with the remote version. If called with two file arguments, the file comparison tool will be asked to compare file 1 with file 2. I think the docs may be wrong about the format of the arguments as well -- I'm pretty sure they should be file:// URLs, not local paths. Let me know if you find something different in actual use.
No screen name said on Nov 7, 2006 at 3:51 PM :
This is not correct. dw.compareFiles *is* a function and *does not* work (at least in my home computer setup, and all my coworkers' work PC setups). I get the exact same error as described above. Please see page 258 of the Dreamweaver 8 API Reference:

dreamweaver.compareFiles()

Availability: Dreamweaver 8.

Description
This function launches the file comparison tool that the user installed in the Diff section of the Preferences dialog box.

Arguments: file1, file2
- The file1 attribute, which is required, is a string that contains the full path to the first file to compare.
- The file2 attribute, which is required, is a string that contains the full path to the second file to compare.

Returns: Nothing.

Example
The following example compares two files, red.htm and blue.htm:

dw.compareFiles("c:\data\red.htm", "e:\data\blue.htm");

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/dreamweaver/8/apiref/13_site9.htm