For more information on using FTP, see
“Associating a remote server with a local site” on page 140.
Before you synchronize your sites, Dreamweaver lets you verify which files you want to put onto or get from your remote server. Dreamweaver also confirms which files have been updated after you complete the synchronization.
To see which files are newer on the local site or which files are newer on the remote site, without synchronizing, choose Edit > Select Newer Local or Edit > Select Newer Remote (Windows, from the Site window) or Site > Site Files View
> Select Newer Local or Site > Site Files View > Select Newer Remote (Macintosh).
To synchronize your files:
1
If you want to synchronize specific files or folders rather than the whole site, choose those files or folders in either the Local or the Remote pane of the Site window.
2 Choose Site > Synchronize in the Site window (Windows) or from the menu bar (Macintosh).
3 To synchronize the entire site, choose Entire ‘ site name’ Site from the Synchronize pop-up menu. To synchronize selected files only, choose Selected Local Files Only (or Selected Remote Files Only if the Remote pane was where you made the most recent selection).
4 Choose the direction in which you want to copy the files:
Choose Put Newer Files to Remote if you want to upload all the local files that have more recent modification dates than their remote counterparts.
Choose Get Newer Files from Remote if you want to download all the remote files that have more recent modification dates than their local counterparts.
Choose Get and Put Newer Files to place the most recent versions of all the files on both the local and the remote sites.
Site Management
153
5 Choose whether or not to delete the files on the destination site that don’t have counterparts on the origin site.
If you choose Put Newer Files to Remote and you select the Delete option, then Dreamweaver deletes any files in your remote site for which there are no corresponding local files. If you choose Get Newer Files from Remote, then Dreamweaver deletes any files in your local site for which there are no corresponding remote files.
6 Click OK.
If the newest version of each chosen file is already in both places, an alert appears, informing you that no synchronization is necessary.
7 In the Synchronize Files dialog box, verify which files you want to delete, put, and get. If you don’t want Dreamweaver to delete, put, or get a particular file, deselect it by clicking the checkbox to the left of the file (in the Action column).
8 Click OK. The files are automatically transferred (and deleted as necessary), and Dreamweaver updates the Synchronize Files dialog box with the status.
9 To save the verification information to a local file, click Save Log.
Searching and replacing
You can search for a file in your local and remote sites from the Document window or the Site window. To display the Site window, choose Window > Site Files.
You can also search the current document, selected files, a directory, or an entire site for text, text surrounded by specific tags, or HTML tags and attributes. Note that you use different commands to search for files and to search for text (and/or HTML) within files: Locate in Local Site and Locate in Remote Site search for files, while Edit > Find and Edit > Replace search for text and tags within files.
Note: If you select Site > Locate in Local Site or Site > Locate in Remote Site while the Document window is active, and if the current file is not part of the currently open site, Dreamweaver attempts to determine which of your locally defined sites the current file belongs to; if the current file belongs to only one local site, Dreamweaver opens that site and then locates the file in it.
To find a file in your local site:
1
Select the file in the Remote pane of the Site window or open the file in a Document window.
2 Choose Site > Locate in Local Site. (On Windows only, if the Site window is active, choose Edit > Locate in Local Site.)
The file is highlighted in the Local pane of the Site window.
154
Chapter 5
To find a file in your remote site:
1
Select the file in the Local pane of the Site window or open the file in a Document window.
2 Choose Site > Locate in Remote Site. (On Windows only, if the Site window is active, choose Edit > Locate in Remote Site.)
The file is highlighted in the Remote pane of the Site window.
To search for text and/or HTML within documents:
1
Choose from the following options:
From the Document or Site window, choose Edit > Find or Edit > Replace.
From the HTML Source inspector, right-click (Windows) or Control-click (Macintosh) and choose Find or Replace from the context menu.
2 In the Find or Replace dialog box that appears, use the Find In option to specify which files to search:
Choosing Current Document confines the search to the active document. This option is available only when you choose Find or Replace with the Document window active, or from the context menu in the HTML Source inspector.
Choosing Selected Files confines the search to the files and folders that are currently selected in the Site window. This option is available only when you choose Find or Replace with the Site window active (that is, in front of the Document window).
Choosing Current Site expands the search to all the HTML documents, library files, and text documents in the current site. After you choose Current Site, the name of the current site appears to the right of the pop-up menu. If this is not the site you want to search, choose a different site from the current sites pop-up menu in the Site window.
Choosing Folder confines the search to a specific group of files. After choosing Folder, click the folder icon to browse to and select the directory you want to search.
Site Management
155
3 Use the Find What option to specify the kind of search you want to perform.
Choosing Text lets you search for specific text strings in the Document window. A text search ignores any HTML that interrupts the string. For example, a search for the black dog would match both the black dog and the
<i>black</i> dog.
Choosing HTML Source lets you search for specific text strings in the HTML
source code. See “About HTML source searches” on page 157.